A simple way to see what was done is to add and subtract -1 from the numerator:
[tex]\dfrac{u^2-1+1}{u^2-1}=\dfrac{u^2-1}{u^2-1}+\dfrac1{u^2-1}=1+\dfrac1{u^2-1}[/tex]
(provided that [tex]u^2-1\neq0[/tex], or [tex]u\neq\pm1[/tex])
###
Suppose you had a slightly more complex integrand, like
[tex]\dfrac{u^3}{u^2-1}=u+\dfrac u{u^2-1}[/tex]
How do we know that? (Assume we don't already know the previous result, so that it's not just a matter of multiplying both sides by [tex]u[/tex].) Simple polynomial division:
[tex]u^3=\boxed{u}_{\,q}\cdot u^2[/tex], and [tex]u(u^2-1)=u^3-u[/tex]. Subtracting this from [tex]u^3[/tex] gives a remainder of [tex]u^3-(u^3-u)=\boxed{u}_{\,r}[/tex], so
[tex]\dfrac{u^3}{u^2-1}=\boxed{u}_{\,q}+\dfrac{\boxed{u}_{\,r}}{u^2-1}[/tex]
(where [tex]q[/tex] and [tex]r[/tex] denote "quotient" and "remainder")