By the fundamental theorem on homomorphisms, $\hom(\mathbb{Z}/n\mathbb{Z},G) \cong \{g \in G : g^n=1\}$, the $n$-torsion of $G$. In other words, $g^n=1$ is the only relation which is required by the image $g$ of the canonical generator of $\mathbb{Z}/n\mathbb{Z}$. One can easily derive from this $\hom(\mathbb{Z}/n\mathbb{Z},\mathbb{Z}/m\mathbb{Z}) \cong \mathbb{Z}/\mathrm{ggT}(n,m)$.
If $E$ generates $G$, then $\hom(G,H) \to \mathrm{Map}(E,H)$ is injective. This is what one means by "a homomorphism is determined by the images of the generators". It is surjective (for all $H$) if and only if $E$ is a free generating set of $G$, i.e. $G= F(E)$ is a free group. Only in this case, every choice of the images produces a homomorphism.
In general, a group presentation exactly contains the information about the relations which are necessary for defining a homomorphism. For example, $G=\langle x,y : x^2 = y^5=1 , xyx^{-1} = y^2 \rangle$ is the group with the property that homomorphisms $G \to H$ correspond to elements $a,b \in H$ (the images of $x,y$) such that $a^2=b^5=1$ and $aba^{-1} = b^2$.