When we inhale, the diaphragm flattens and moves down and hence increases the volume of the chest cavity. The intercostal muscles contract so the ribs extend upwards and outwards, increasing the volume of the chest cavity even further. This increase in volume lowers the pressure of air in the lungs. Then air rushes in from outside, where it is at a higher pressure.