How can one visualize a homomorphic mapping.
Solution 1:
One way to view a homomorphism is using group actions. If $G$ is a group and $X$ is a set, then an action of $G$ on the set $X$ is a map $$\begin{align*} G\times X&\rightarrow X\\ (g, x)&\mapsto x\cdot g \end{align*} $$ such that the following two conditions hold. $$ \begin{align*} &x\cdot 1=x\:&\forall\:x\in X\\ &x\cdot(gh)=(x\cdot g)\cdot h\:&\forall\:x\in X \end{align*} $$ We write$^{\dagger}$ $G\curvearrowright X$ to mean that $G$ acts on $X$. This definition might initially seem mysterious, but if you remember Cayley's Theorem, all this is saying is that every group acts on something, and another theorem of Cayley states that every group acts on a graph. Other examples are Dihedral groups, which act on polygons, and the cyclic group of order $n$ acts on an $n$-gon by rotation. Wikipedia has lots of examples. Group actions are important.
How is this related to homomorphisms? Well, an action $G\curvearrowright X$ corresponds to a homomorphism $G\rightarrow \operatorname{Aut}(X)$. Examples:
The dihedral group of order $2n$, denoted $D_{n}$, is the automorphism group of an $n$-gon, and of course $D_8=\langle \alpha, \beta; \alpha\beta\alpha=\beta^{-1}, \alpha^2=1, \beta^8\rangle$ acts on a square in a natural way ($\alpha$ still flips, $\beta$ still rotates). So this action corresponds to a homomorphism $D_8\rightarrow D_4$, and it is easy to see that it is not injective (because the element $\beta^4$ fixes the square) but that it is surjective.
The cyclic group of order $n$, $\mathbb{Z}_n$, acts on an $n$-gon by rotation. This gives an injective, non-surjective map $\mathbb{Z}_n\rightarrow D_{2n}$.
Cayley's theorem: You can prove Cayley's theorem really quickly using group actions, as follows. Every group acts on itself by right multiplication: $$ \begin{align*} G\times G&\rightarrow G\\ (g, h)&\mapsto g\cdot h \end{align*} $$ Hence, there exists a homomorphism $G\rightarrow S_G$ (where $S_G$ is the symmetric group on the set underlying the group $G$, so $S_G$ is the automorphism group of the set underlying $G$ rather than the automorphism group of the group $G$ itself). This map is injective as if $g\cdot h=1\cdot h$ then $g=1$, so the kernel is trivial. Hence, $G$ embeds into $S_G$.
There exists a surjective homomorphism from the cyclic group of order $mn$, $\mathbb{Z}_{mn}$, to the cyclic group of order $n$, $\mathbb{Z}_n$, because both $\mathbb{Z}_{mn}$ and $\mathbb{Z}_{n}$ act on the (directed) $n$-gon by rotation ("directed" means that flipping is not allowed, so the automorphism group is $\mathbb{Z}_n$ rather than $D_{2n}$). Exercise: Use this action to find the kernel of the surjection $\mathbb{Z}_{mn}\rightarrow \mathbb{Z}_n$.
$^{\dagger}$ This notation is the one I have come across most, but it seems that there is no standard notation for an action. So perhaps I should have said "I write..."
Solution 2:
What often helps me is the following rather primitive intuition based on isomorphism theorems:
Suppose you have two groups/rings $A, B$. Take a normal subgroup/both sided ideal $C \subseteq A$ and consider the projection $$\pi_c:A \rightarrow A/C$$ (here it is pretty obvious what the projection does: it glues together certain elements of $A$ in a manner that allows to define operations of the classes of glued elements via represetatives of the classes. so it is something like "making the structure coarser").
Now assumee that there is a subgroup/subring $D$ of $B$ such that it is isomorphic to $A/C$ and fix some suh isomorphsim $\varphi$.
Then the composition $A\rightarrow A/C \stackrel{\varphi}\rightarrow D \subseteq B$ gives a homomorphism $A\rightarrow B$, but what the (first, I think) isomorphism theorem shows is that every homomorphism $\psi: A\rightarrow B$ is of this form (with $C=\mathrm{Ker} \psi$ and $D=\mathrm{Im}\psi$). So what every homomorphism does is that it makes the structure of the domain (more or less) coarser and then embeds it into the codomain.