It is a good question and I will answer it from the perspective of universal algebra, which includes all of these. Any algebraic structure is a set with an imposed structure on it through various $n$-ary operations. You are most commonly familiar with the binary operations.
However a thing we often want to do is to group objects together. In some cases there are simply "too many" where the majority are distinct by some quality we do not really care for. So we try to group these together such that each of these classes contain all elements that are the same with respect to our desired property and differ only by the property we do not care about.
Such classes are equivalence classes and the relation between the elements is an equivalence relation. A prototypical is the rational numbers where we have
$$\frac{p}{q}=\frac{np}{nq}$$
In a purely set theoretical view those are distinct and different but we don't care about that in our usage of rationals so they are grouped together. However an equivalence relation does NOT necciserily go together with our $n$-ary operations. This is where the concept of well-definedness comes from. A function is well-defined if the choice within the equivalence class does not matter for the result of the function.
An example of a non-well-defined is
$$f(\frac{p}{q})=p$$
Now what does this have to do with this? A relation that respects the operations and thereby makes the $n$-ary operations well-defined with the equivalence classes, is called a congruence class. With a congruence relation we can split up the structure into the classes and have the operations be meaningful and well-defined. A fundamental property is that any homomorphism, which is defined for universal algebra as
$$\varphi(f^A(x_1,\ldots,x_n))=f^B(\varphi(x_1),\ldots,\varphi(x_n))$$
where $\varphi:A\to B$ is a homomorphism and $f^A,f^B$ are $n$-ary operation in the source adn target structure, is that the kernel
$$\ker\varphi=\{(x,y)\in A^2:\varphi(x)=\varphi(y)\}$$
is always a congruence relation. More importantly the CONVERSE is true, every congruence relation IS the kernel of a homomorphism. We can then show that $\varphi(A)=A/\ker \varphi$ for any algebraic structure. Where the quotient is the grouping according to the congruence relation.
For groups and rings it can be shown rather easily that a congruence relation neccesitate a normal subgroup and an ideal and the definitions we use.
As for a visual, imagine the structure as a bread and then you cut it into slices that you focus on, rather than the individual atoms in the bread.