How to describe all ring homomorphisms $f: A \rightarrow B$, such that corresponding affine scheme morphism $f: Spec \, B \rightarrow Spec \, A$ is open immersion?
The answers in the link given by Manny are great. Let me just add another sufficient condition which may be simpler to check than, e.g. flatness. If
then $f$ is an open immersion. This is a form of Zariski's Main Theorem.