There are homomorphisms of a group into itself that are one-to-one but not onto. Example :
$f:\Bbb Z \rightarrow \Bbb Z$ defined by $f(n)=2n$. $f$ is a homomorphism with kernel ${0}$. Therefore it is one-to-one. Image of the homomorphism is $2\Bbb Z$. Therefore it is not onto.
Is there an example of a homomorphism of a group onto itself that is not one-to-one?
It has to be an infinite group $G$ having a normal subgroup $N$ such that $G/N≈G$. Index of this normal subgroup $N$ in $G$ must be infinite.