Is this morphism $\mathcal O_Y\to f_*\mathcal O_X$ the same as $f^\sharp$? Let $(f,f^\sharp): (X,\mathcal O_X)\to (Y,\mathcal O_Y)$ be a morphism of schemes, then we have $f^\sharp: \mathcal O_Y\to f_*\mathcal O_X$, it induces $f_* f^{-1} \mathcal O_Y\to f_*f^{-1}f_*\mathcal O_X$, because we have the canonical morphisms of sheaves $\mathcal O_Y\to f_*f^{-1} \mathcal O_Y$ and $f^{-1}f_*\mathcal O_X\to \mathcal O_X$, then we get $f_*f^{-1}f_*\mathcal O_X\to f_*\mathcal O_X$, then we have the composite of three morphisms $\mathcal O_Y\to f_* f^{-1} \mathcal O_Y\to f_*f^{-1}f_*\mathcal O_X\to f_*\mathcal O_X$, at last we also get a morphism  $\mathcal O_Y\to f_*\mathcal O_X$, is it the same as $f^\sharp$?
 A: The result seems more of a sheaf-theoretic one. 
Let $f: X \rightarrow Y$ be a continuous map, $\mathcal{F}$, $\mathcal{G}$ be sheafs on $X$ and $Y$, respectively (in your case $\mathcal{F}=\mathcal{O}_X$, $\mathcal{G}=\mathcal{O}_Y$). 
Define $\pi_1$ as the natural morphism $\mathcal{G} \rightarrow f_*f^{-1}\mathcal{G}$, and $\pi_2$ as the natural morphism $f^{-1}f_*\mathcal{F} \rightarrow \mathcal{F}$. 
Then it is known (see eg Liu, Algebraic Geometry and Arithmetic Curves, section 2.2, exercise 13, with the corrected statement) that the applications $$\alpha: \lambda \in \text{Mor}_Y(\mathcal{G},f_*\mathcal{F}) \longmapsto \pi_2 \circ (f^{-1}\lambda) \in \text{Mor}_X(f^{-1}\mathcal{G},\mathcal{F})$$ and $$\beta: \lambda \in \text{Mor}_X(f^{-1}\mathcal{G},\mathcal{F}) \longmapsto  (f_*\lambda) \circ \pi_1\in \text{Mor}_Y(\mathcal{G},f_*\mathcal{F})$$ are inverse bijections. 
To prove it, you show that $\beta$ is injective and $\beta \circ \alpha=Id$. 
The proofs of these results seem rather “abstract nonsense-ey” to me (because I’m very new to it, I guess), so I don’t know how it works for you. 
Now, your composed morphism is $f_*\pi_2 \circ f_*f^{-1}f^{\sharp} \circ \pi_1=f_*(\beta(f^{\sharp})) \circ \pi_1=\alpha(\beta(f^{\sharp}))=f^{\sharp}$. 
