How do you know if a series converges by the intergral test?

When you take the integral using the series as integrand, it converges if the integral worked out to be a number. If it's infinte, the series diverge.