Theory of plasma heating by low frequency waves: Magnetic pumping and Alfvén resonance heating