This is a very powerful rule in integration. However, it may require some intuition to master. You will use this rule when you are given some function to integrate, and that function is somewhat close to one of your basic rules, but not in a way that allows you to use it. Hence, you will do some substitutions using the dummy-variable $u$ (it has nothing special to it, just convention) to make your integration fit the one you know.
You may try to use this rule when you see 2 things multiplying, dividing, or adding/subtracting in a way you can't separate. This rule may not always work. If it doesn't work, then you will have to learn Calculus II for more techniques and rules.
My only tip to use U-Sub is to see which part you can make $u$ equal to such that it cancels everything else that has an $x$ variable. This is ambiguous, I know, but practice will help. I will show you the correct way to do it in addition to the wrong way (in this video for this problem: $\int 2x(3x^2+4)^5 \, dx$)
Examples. (I'm still trying out how to put videos over here. Sorry)