A chain complex is a system $C = (C_n,\partial^C_n)_{n \in \mathbb Z}$ of abelian groups $C_n$ and homomorphisms $\partial^C_n : C_n \to C_{n-1}$ such that $\partial^C_{n-1} \circ \partial^C_n = 0$ for all $n$. Given a chain map $f = (f_n) : C \to D$ between chain complexes $C,D$ such that all $f_n : C_n \to D_n$ are injective, we define $E_n = D_n/\operatorname {im} f_n$ and let $p_n : D_n \to E_n$ denote the quotient homomorphism. The $\partial^D_n$ induce homomorphisms
$$\partial^E_n : E_n \to E_{n-1}, \partial^E_n ([x]) = [\partial^D_n(x)] .$$
This is well-defined: $[x] =[x']$ means $x - x' \in \operatorname {im} f_n$. i.e. $x - x' = f_n(y)$ for some $y \in C_n$. Hence $\partial^D_n(x) - \partial^D_n(x') = \partial^D_n(x-x') = \partial^D_nf_(y) = f_{n-1}\partial^D_{n-1}(y) \in \operatorname {im} f_{n-1}$.
Clearly the system $E = (E_n, \partial^E_n)$ is a chain complex and $p = (p_n) : D \to E$ is a chain map with surjective $p_n$. The sequence
$$0 \to C \stackrel{f}{\to} D \stackrel{p}{\to} E \to 0$$
is exact by definition.
For a space $Z$ we get the singular chain complex $C_*(Z)$ which has the property that $C_n(Z) = 0$ for all $n < 0$. The augmented singular chain complex $\tilde C_*(Z)$ is defined by
$$\tilde C_n(Z) = \begin{cases} C_n(Z) & n \ne -1 \\ \mathbb Z & n = -1 \end{cases}, $$
$$\partial^{\tilde C_*}_n= \begin{cases} \partial^{C_*}_n & n \ne 0, -1 \\ \epsilon & n = 0 \\ 0 & n = -1 \end{cases}, $$
where $\epsilon : C_0(Z) \to \mathbb Z, \epsilon (\sum_i n_i \sigma_i) = \sum_i n_i$.
Given a pair $(X,A)$, the inclusion $i : A \to X$ induces a chain map $i_* : C_*(A) \to C_*(X)$. The sequence
$$0 \to C_*(A) \stackrel{i_*}{\to} C_*(X) \stackrel{p}{\to} C_*(X,A) \to 0 \tag{1}$$
is known to be exact by out above general considerations. Here $C_n(X,A) = C_n(X)/\operatorname {im} i_n^*$. Usually one writes $C_n(X,A) = C_n(X)/C_n(A)$ because $C_n(A)$ can be regarded as a genuine subgroup of $C_n(X)$ in the obvious way. The group $C_n(X,A)$ can also be regarded as the free abelian group generated by all singular $n$-simplices $\sigma : \Delta^n \to X$ such that $\sigma(\Delta^n) \not\subset A$.
$i$ also induces a chain map $\tilde i_* : \tilde C_*(A) \to \tilde C_*(X)$ by taking $\tilde i_n = i_n$ for $n \ne -1$ and $\tilde i_{-1} = id : \mathbb Z \to \mathbb Z$. This yields the exact sequence
$$0 \to \tilde C_*(A) \stackrel{\tilde i_*}{\to} \tilde C_*(X) \stackrel{p}{\to} \tilde C_*(X,A) \to 0 \tag{2}$$
where $\tilde C_n(X,A) = \tilde C_n(X)/\operatorname {im} (\tilde i_n)^*$. In all degrees $\ne -1$ this agrees with $(1)$, but in degree $-1$ we have in fact
$$0 \to \mathbb Z \stackrel{id}{\to} \mathbb Z \stackrel{p}{\to} \mathbb Z/\mathbb Z = 0 \to 0$$
By construction we get $\tilde H_n(X,A) = H_n(X,A)$ for all $n$ and $\tilde H_n(Z) = H_n(Z)$ for $n \ne 0,-1$.
For $n = 0$ we have $\tilde H_0(Z) \ne H_0(Z)$ and for $n = -1$ we have
$$\tilde H_{-1}(Z) = \begin{cases} 0 & Z \ne \emptyset \\ \mathbb Z & Z = \emptyset \end{cases} .$$
For this phenomenon see also