A chain complex $C$ is a collection of abelian groups $C_n$ together with boundary operators $\del_n: C_{n+1}\to C_n$, such that $\del_n \circ\del_{n+1}=0$. The collections of all such objects will be denoted by $\Ch{\cat{Ab}}$.
\end{definition}
In other words a chain complex is the following diagram.
Of course we can make this more general by taking for example $R$-modules instead of abelian groups. We will later see which kind of algebraic objects make sense to use in this definition \todo{Ch: Will I discuss ab. cat. ?}. The boundary operators give rise to certain subgroups, because all groups are abelian, subgroups are normal subgroups.
It follows from $\del_n \circ\del_{n+1}=0$ that $\im(\del: C_{n+1}\to C_n)$ is a subset of $\ker(\del: C_n \to C_{n-1})$. Those are exactly the abelian groups $B_n(C)$ and $Z_n(C)$, so $ B_n(C)\nsubgrp Z_n(C)$.
In order to see why we are interested in the construction of homology groups, we will look at an example from algebraic topology. We will see that homology gives a nice invariant for spaces. So we will form a chain complex from a topological space $X$. In order to do so, we first need some more notions.
In particular $\Delta^0$ is simply a point, $\Delta^1$ a line and $\Delta^2$ a triangle. There are nice inclusions $\Delta^n \mono\Delta^{n+1}$ which we need later on. For any $n \in\N$ we define:
For any space $X$, we will be interested in continuous maps $\sigma : \Delta^n \to X$, such a map is called a $n$-simplex. Note that if we have any continuous map $\sigma : \Delta^{n+1}\to X$ we can precompose with a face map to get $\sigma\circ\delta^i : \Delta^n \to X$, as shown in figure~\ref{fig:diagram_d}. This will be used for defining the boundary operator. We can make pictures of this, and when concerning continuous maps $\sigma : \Delta^{n+1}\to X$ we will draw the images in the space $X$, instead of functions.
This might seem a bit complicated, but we can pictures this in an intuitive way, as in figure~\ref{fig:singular_chaincomplex3}. And we see that the boundary operators really give the boundary of an $n$-simplex. To see that this indeed is a chain complex we have to proof that the composition of two such operators is the zero map.