Let $f:X\rightarrow Y$ be a morphism of schemes.
When $PicY\rightarrow PicX$ is an embedding, and $f_{*}\mathscr{O}_{X}$ is invertible, it is the structure sheaf of $Y$.
In the proof of Zariski's Main Theorem, we have: If $f$ is birational, finite, integral, and $Y$ is normal, then $f_{*}\mathscr{O}_{X}$ is the structure sheaf of $Y$.
My questions are
whatWhat exactly prevent $f_{*}\mathscr{O}_{X}$ to be a structure sheaf?
Is there any necessary and sufficient condition(s) guarantee that $f_{*}\mathscr{O}_{X}$ is a structure sheaf?