For example, consider the integral
\[\int e^x\sin x\,dx\]
The general rule for finding your $u$ is given by the anagram LIPET, where it goes from highest priority to lowest priority.
L: Logarithm
I: Inverse Trigonometric
P: Polynomials/Algebra
E: Exponential
T: Trigonometric
In the case that you only have exponential and trig, either one can be your $u$.
So, for example, if your integrand contains inverse trig and exponential functions, you let $u$ be the inverse trig function.
In the particular example I gave, we only have exponential and trigonometric functions in the integrand, so we can pick either term to be our $u$. Without loss of generality, say $u=e^x$. Now, $\,dv$ is everything else; that is, $\,dv=\sin x\,dx$. Finding $\,du$ is straightforward (we just differentiate to get $\,du=e^x\,dx$). To find $v$, you need to integrate the $\,dv$ term, that is, $v=\int\,dv=\int \sin x\,dx=-\cos x$.
So, to find $v$ in general from integration by parts, you always end up integrating the value you have for $\,dv$.
I hope this makes sense!
EDIT: Ninja'd