When is the preimage of prime ideal is not a prime ideal? If $f\colon R\to S$ is a ring homomorphism such that $f(1)=1$, it's straightforward to show that the preimage of a prime ideal is again a prime ideal.
What happens though if $f(1)\neq 1$? I use the fact that $f(1)=1$ to show that the preimage of a prime ideal is proper, so I assume there is some example where the preimage of a prime ideal is not proper, and thus not prime when $f(1)\neq 1$? Could someone enlighten me on such an example? 

Consider the "rng" homomorphism $f:\mathbb{Z}\to\mathbb{Q}$ where $f(n)=0$; then $(0)$ is a prime ideal of $\mathbb{Q}$, but $f^{-1}(0)=\mathbb{Z}$ is not proper, hence not prime.
A different example would be $f:\mathbb{Z}\to\mathbb{Z}\oplus\mathbb{Z}$ where $f(1)=(1,0)$; then for any prime ideal $P\subset \mathbb{Z}$, we have that $I=\mathbb{Z}\oplus P$ is a prime ideal of $\mathbb{Z}\oplus\mathbb{Z}$, but $f^{-1}(I)=\mathbb{Z}$ is not proper, hence not prime.
