morphism of the local rings correspond to what kind of maps between varieties To a regular(or polynomial) map $f: X \to Y$ between affine varieties we associate its pullback $f^\ast: K[Y] \to K[X]$ and it holds that f is an isomorphism iff $f^\ast$ is an isomorphism.
Now if $\mathcal{O}_X,p$ denotes the local ring of X at p and $\phi: \mathcal{O}_{X,p} \to \mathcal{O}_{Y,q}$ is an ring homomorphism/isomorphism, to what "kind" of morphism  between the varieties X and Y does it correspond?
Are these the so called rational maps?
Or do rational maps correspond to K-morphisms of the function fields $K(X)$ and $K(Y)$?
 A: Maps of the form $\phi$ correspond to rational maps from $Y$ to $X$ which are regular at $q$.  If $\varphi$ is an isomorphism, then it induces an isomorphism on fraction fields (I am assuming that "variety" means irreducible here since you are talking about function fields), i.e., an isomorphism from $K(Y)$ to $K(X)$.  
In general, (not necessarily iso-)morphisms of function fields $K(Y)$ to $K(X)$ correspond to dominant rational maps $f: X \rightarrow Y$, i.e., those with Zariski-dense image.  For a map $\phi$ -- or any homomorphism of integral domains -- 
to extend to a homomorphism on the fraction fields, it is necessary and sufficient that it be injective.  
A: 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.) 
