Inspiration occurs when the inspiratory muscles—that is, the diaphragm and the external intercostal muscles—contract. Contraction of the diaphragm (the skeletal muscle below the lungs) causes an increase in the size of the thoracic cavity, while contraction of the external intercostal muscles elevates the ribs and sternum. Thus, both muscles cause the lungs to expand, increasing the volume of their internal air passages. In response, the air pressure inside the lungs decreases below that of air outside the body. Because gases move from regions of high pressure to low pressure, air rushes into the lungs.
Expiration occurs when the diaphragm and external intercostal muscles relax. In response, the elastic fibers in lung tissue cause the lungs to recoil to their original volume. The pressure of the air inside the lungs then increases above the air pressure outside the body, and air rushes out. During high rates of ventilation, expiration is facilitated by contraction of the expiratory muscles (the intercostal muscles and the abdominal muscles).