Lungs developed as marine life forms began to adapt to life on dry land. With lungs it is possible to absorb oxygen directly from the air, provided their absorptive surface is kept moist. Only 21 per cent of the air we breathe is oxygen, but we do not use it all. Exhaled air is still 16 per cent oxygen. When our need for oxygen increases, blood flow through the lungs is increased by breathing faster and stepping up the heart rate. While oxygen is diffusing into the lungs, carbon dioxide diffuses out. Every cell in the body requires oxygen to liberate energy from glucose, and every cell in the body produces unwanted carbon dioxide in the process. Water is another by-product of cellular respiration; appreciable amounts are lost through the lungs, the rest is mainly disposed of in the urine.
Gaseous exchange takes place in tiny cul-de-sacs in the lungs called alveoli. These have, in the adult human lung, a combined surface area of about 70 m2 (750 ft2), roughly the size of a tennis court. Blood laden with carbon dioxide is pumped from the heart to the lungs through the pulmonary arteries; oxygen-rich blood returns to the heart through the pulmonary veins. Connecting these arteries and veins are many millions of alveoli, each supplied with thousands of blood capillaries constantly swapping carbon dioxide for oxygen.
The lungs are twin, conical structures, one on either side of the heart. They are enclosed in a double membrane, the pleural membrane, which is filled with fluid to allow friction-free movement inside the ribcage. The diaphragm, the dome of muscle primarily responsible for breathing movements, lies directly beneath the heart and lungs.
Each lung is a mass of branching airways which get narrower and narrower as they approach the alveoli. The walls of these airways produce mucus to keep the internal environment of the lungs moist; they are also lined with tiny hairs which beat together like wheat in the wind, trapping dust and other foreign particles and ferrying them out of the lungs so that they can be expelled by coughing or sneezing. Nicotine paralyses this extremely efficient rubbish removal system, resulting in 'smoker's cough'. Foreign particles which remain in the lungs, and of course any opportune viruses or bacteria, cause local inflammation and excessive production of mucus. If many small airways become blocked and many clusters of alveoli become flooded with mucus, respiration deteriorates. In bronchitis and pneumonia the lungs are partially suffocated by their own secretions.
We breathe in and out because the air pressure inside our lungs is constantly changing in relation to the air pressure outside. As we inhale, the diaphragm contracts and descends and the ribcage rises and expands; this decreases pressure inside the lungs, and so air rushes in. As we exhale, the diaphragm rises and the ribs fall, pulled down by gravity; this increases pressure inside the lungs, and so air rushes out. Although we can control the rate and depth of our breathing, we cannot voluntarily stop breathing.