Let $A\longrightarrow B\longrightarrow C$ be a complex of $R$-modules, where we label the maps $f$ and $g$, respectively.
Why is the sequence $0\longrightarrow H(B)\longrightarrow \text{coker}(f)\longrightarrow \text{im}(g)\longrightarrow 0$ exact? (where $H(B)$ is $\text{ker}(g)/\text{im}(f)$, the cohomology of the sequence at $B$.)
How do we even get the two internal maps, let alone exactness?
We have a sequence
$$0\to\ker(g)\hookrightarrow B\xrightarrow{g}\text{im}(g)\to 0$$
which is clearly exact. Furthermore, $\text{im}(f)\subseteq\ker(g)\subseteq B$ and $\text{im}(f)$ is mapped to $0$ by $g$ since $gf=0$, so we have an induced surjective map $\text{coker}(f)=B/\text{im}(f)\xrightarrow{\bar{g}}\text{im}(g)$. The map $\ker(g)\to\text{coker}(f)$ (which is the composition of the inclusion map $\ker(g)\hookrightarrow B$ and the projection map $B\to B/\text{im}(f)$) has kernel $\text{im}(f)=H(B)$, so we have the induced injective map $H(B)=\ker(g)/\text{im}(f)\to\text{coker}(f)$. Then, by the exactness of the first sequence, we conclude that
$$0\to H(B)\to\text{coker}(f)\xrightarrow{\bar{g}} \text{im}(g)\to 0$$
is exact.