The diaphragm is the primary muscle of inspiration. It is a thin, dome-shaped sheet of muscle that inserts into the lower ribs. When it contracts, it pushes downward and spreads out, increasing the vertical dimension of the chest cavity and driving up abdominal pressure. This increase in pressure drives the abdominal contents down and out, which in turn increases the transverse size of the chest cavity.
Because the diaphragm is covered by the inferior surface of the parietal pleura, when it contracts it pulls the pleura with it. This lowers the pleural pressure, which causes the alveolar pressure to drop, which, in turn, causes air to flow into the lungs. During quiet expiration, the diaphragm passively relaxes and returns to its equilibrium position. However, during exercise, expiration becomes an active process-- the abdominal muscles contract to raise abdominal pressure, which pushes the diaphragm upward and forces air out of the lungs. During quiet breathing, the diaphragm moves a centimeter or two up and down, but during exercise, it can move more than 10 cm.
The diaphragm is supplied by the phrenic nerve from cervical segments 3, 4, and 5.