Can ring homomorphisms be characterized as ring maps such that preimage of any ideal is an ideal?
Solution 1:
No. For instance, the function from any ring to itself which reverses the sign of each element (i.e. $f(x) = -x$) will conserve ideals, but it usually won't be a homomorphism.
Solution 2:
You can make this fail, for almost any nonzero $R$ and almost any nonzero $S$, by taking $$f(x)=\begin{cases} 0,&\ x=0\\ \ \\ s_0,&\ x\ne0\end{cases}$$ where $s_0$ is a nonzero fixed element of $S$,
Then for any ideal the pre-image will be $\{0\}$ or $R$, depending on whether the ideal contains $s_0$ or not.
In some corner cases $f$ may result in an isomorphism, as Eric mentions below.