Any immersion in the category of schemes is a monomorphism.
Now, I now that $f: X \rightarrow Y$ is a monomorphism if and only if $\Delta_f: X \rightarrow X \times_Y X$ is an isomorphism.
To prove that any immersion is a monomorphism, I want to prove that open and closed immersions are monomorphisms and the result will follow since composition of monomorphisms is a monomorphism.
Regarding open immersions I was thinking to prove that $Y' \simeq Y' \times_Y Y'$ where $Y' \subset Y$ is the open subscheme through which $f$ factors uniquely.