Let $S$ be a scheme, $X$ and $Y$ $S-$schemes, and consider the base change
$$X_Y := X \times_S Y.$$
Is there a simple way to describe $\mathcal{O}_{X_Y,z}$ at any given point $z \in X_Y$ in terms of the local rings $\mathcal{O}_{X,x}$ and $\mathcal{O}_{Y,y}$ at the projections $x=p(z), y=q(z)$? If the answer is "no" in general: is there such a way for varieties and base change over fields, or just for affine varieties?