In the Text Herstein's Algebra :
In the Homomorphism section, he defines Kernel as :
If $\phi$ is a homomorphism of G into G, the kernel of $\phi$, $K_\phi$, is defined by $K_\phi$ = {$x \in G $ | $\phi(x)$ = e, e = identity element of G}.
And then states this particular Lemma :
If $\phi$ is a homomorphism of G into $\bar{G}$ with kernel K, then K is a normal subgroup of G.
Here, why the mapping between G and $\bar{G}$ has to be into ? Will K be a normal subgroup if mapping is onto ?
I think your confusion arises from the wording "into".
For a function $f:A\rightarrow B$, we normally say that $f$ is a function from $A$ to $B$. Although in this book the author sometimes said $f$ is a function (or mapping) from $A$ into $B$, they are basically the same thing. They mean that for every $a\in A$, there must be a unique element $b\in B$ such that $f(a)=b$.
Let $G,\bar{G}$ be two groups.
As long as $f:G\rightarrow \bar{G}$ is a homomorphism (that is, $f:G\rightarrow \bar{G}$ is a well-defined function such that $f(xy)=f(x)f(y)$ for all $x,y\in G$), the kernel of $f$ is always a normal subgroup of $G$.
So if furthermore the function $f$ is onto (or surjective), the kernel of $f$ is still normal in $G$.