Breathing involves the acts of inhaling and exhaling. Inhaling occurs as the chest cavity expands. As the chest expands, so do the lungs. Air from the atmosphere rushes in and fills the enlarged lungs. Exhaling occurs as the chest cavity shrinks, which pushes air out of the lungs. Inhaling and exhaling result chiefly from contractions of the diaphragm, a large muscle that forms the floor of the chest cavity. As the diaphragm contracts, the cavity expands. As it relaxes, the cavity shrinks. The muscles that move the ribs also play a part in the breathing process.