So, in your example this is already done - $z^2 + i$ is of degree $2$, which is lower than the degree of $z^2(z+1)$ (which is degree $3$). So this is just a partial fractions problem; write $\frac{z^2 + i}{z^2(z+1)} = \frac{A}{z} + \frac{B}{z^2} + \frac{C}{z+1}$ and solve for $A$, $B$, and $C$.
But to address your question: the technique you're asking about would apply if we were looking at, for example, $\frac{z^3 + i}{z^2(z+1)}$. For this, partial fractions won't work right away; we have to do polynomial division first.
$z^3 + i$ divided by $z^2(z+1) = z^3+z^2$ gives the quotient $1$ with remainder $-z^2 + i$ (I'm omitting the steps of the long division; searching "polynomial long division" on Google will give plenty of excellent examples). What this means is that $\frac{z^3 + i}{z^2(z+1)} = 1 + \frac{-z^2+i}{z^2(z+1)}$. Now the fraction we have left is of the correct form to break into partial fractions.