Consider chain rule but backwards.$$f[g(x)]dx=g'(x)f'[g(x)]$$Therefore:$$\int g'(x)f'[g(x)]dx=f[g(x)]$$What you want to do is to manipulate the integral with substitution, following that rule.
For example:$$\int f'(x)dx=f(x)$$You want to use the substitution $x=g(u)$.
To do that, you have to differentiate:$$xdx=g(u)du$$$$1=g'(u)$$$$\int(1)f'(x)dx=f(x)$$$$\int g'(x)f'[g(x)]dx=f[g(x)]$$This was always confusing for me at first, but looking at it, it made more sense for me. Also note the $(1)$ where we put $g'(x)$ because that is what $xdx=g(u)du$ gave us to substitute in.
Perhaps you wanted to use the following substitution:$$\sqrt{x^2-4}$$First, draw a triangle. Remember $a^2+b^2=c^2$. Try to make it look like the thing you want to substitute.$$a^2+b^2=c^2$$$$a^2=c^2-b^2$$$$a=\sqrt{c^2-b^2}$$$$a=g(x)=\sqrt{x^2-2^2}$$Now choose an angle to use.
Use trigonometric identities (mainly $\sin=\frac{opp}{hyp},\cos=\frac{adj}{hyp},\tan=\frac{opp}{adj}$)
Substitute them in (don't forget to differentiate and apply backwards chain rule) and integrate from there. If it didn't work, try again with another trigonometric functions, manipulate with some trigonometric identities, and you should eventually get something integratable.
Do mind me if I've made a few mistakes, I haven't actually been taught this at school yet, so I'm a bit rusty. (I self-teach)