The best way to learn the theory of integration and grasp the subtleties involved is to do exercises and solve problems. This book discusses integration of real functions of a real variable. It contains over 500 problems concerning the Riemann and Riemann-Stieltjes integrals and the Lebesgue integral.
It's a must read for every mathematics student, a wonderful guide in helping develop the ability to write proofs on one's own, and try to develop counterexamples leading to much deeper understanding of the underlying ideas.