You've been learning the different methods of integration in a very artificial environment. You know that if you're in the "Integration by Substitution" section, you use substitution. If you're in the "Integration by Parts" section, you use integration by parts.
In the real world (by which we mean on exams), the directions probably won't say which method to use—you'll have to figure that out yourself.
The more you practice, the better you'll get at figuring out which method to use - you won't even have to think about it. In the meantime, we have some hints.