The integration by parts formula takes the form:
int(uv') = uv - int(vu')
where v' = dv/dx and u' = du/dx
A lot of the art of using the integration by parts is working out which part to differentiate and which part to integrate. I find that the most important thing to look at first is 'reducing the power', and making the second integral simpler. So I would recommend looking at differentiating anything of the form x^n, and avoiding differentiating sines, cosines, or exponentials. Other than that tip, integrating by parts is a process that just needs to be repeated until your answer pops out!