When you inhale, the diaphragm muscles contracts and the chest cavity increases its size. There is now more space and less air pressure inside the lungs. Air pushes in from the outside when there is higher air pressure. It pushes into the lungs where there is lower air pressure. And when you exhale the diaphragm muscle relaxes and then the chest cavity returns to its original size. There is now less space and greater air pressure inside the lungs. It pushes the air outside where there is lower air pressure.