The corollary says - An arbitrary morphism $f:X\longrightarrow Y$ is separated if and only if the image of the diagonal morphism is a closed subset of $X\times_{Y} X$.
I am studying the proof of this proposition. One way is obvious. To prove the other way, we need to prove that $\Delta$ is a homeomorphism onto $\Delta(X)$ and the morphism of sheaves $O_{X\times_{Y} X}\longrightarrow\Delta_*{O_X}$ is surjective. Homeomorphism again is easy to prove. But to prove the surjectivity, Hartshorne says it is a local question. Does that mean we check it at the stalk level? I don't understand this part of the proof.