When you are working with nice schemes $X$ (say, of finite type over a fixed noetherian scheme; if you are interested in varieties this is automatic), it usually happens that "properties of the local scheme $\mathrm{Spec} \mathcal{O}_X$" determine the properties of $X$ in a neighborhood. For a morphism $X \to Y$, properties of the morphism on localizations $\mathrm{Spec} \mathcal{O}_{x, X} \to \mathrm{Spec} \mathcal{O}_{f(x), Y}$ determine local properties of the morphism $X \to Y$. As another example, properties of something at the "generic point" determine properties in some open neighborhood, and vice versa. This is actually a very powerful tool (because reasoning over local rings can be much simpler than reasoning about general rings) and can be used to reduce questions about morphisms $f: X \to Y$ to the case where $Y$ is the spectrum of a local ring.
Another example of this is that a morphism $\mathcal{Spec} \mathcal{O}_{x, X} \to \mathrm{Spec} \mathcal{O}_{y, Y}$ necessarily extends to a morphism from a neighborhood of $x$ to a neighborhood of $y$. (This morphism is, for instance, an isomorphism locally iff it is an isomorphism on the local schemes.)