Given two schemes $X$ and $Y$, and a continuous map $f$ between the underlying spaces, what conditions are necessary for the existence of a map of sheaves $g:\mathcal{O}_Y\rightarrow f_*\mathcal{O}_X$ such that $(f, g)$ defines a morphism of schemes?
Assume $X$ and $Y$ are locally of finite type over $\mathrm{Spec}\:k$ for $k$ an algebraically closed field, if that makes life any easier.
Some conditions are necessary because there is no morphism of schemes $\mathrm{Spec}\:\mathbb{Q}\rightarrow \mathrm{Spec}\:\mathbb{R}$ (cardinality). Alternatively, there is no morphism of schemes from the $k$-affine line with double origin to the $k$-affine line that restricts to a homeomorphism on the underlying spaces (albeit there is a homeomorphism).