When you inhale, your diaphragm contracts and flattens, which increases the space in your chest cavity and creates a vacuum that pulls air into your lungs. This is because the diaphragm is the major muscle of respiration and plays an important role in breathing. When you exhale, the diaphragm relaxes and moves upward in the chest cavity, which decreases the space in your chest cavity and forces air out of your lungs.