explain how the lungs work