The diaphragm is a large muscle located at the base of the lungs. It is naturally dome shaped when relaxed.
When we need to inhale, the diaphragm will contract and flatten out. This increases the volume of the lungs (thorax), which causes the pressure in the thorax to decrease as the same amount of air is now in a larger space. As we know, air will move from an area of high to low pressure so the relatively higher pressure of the surroundings will cause air to flow into the lungs.
The opposite is true of exhalation. The diaphragm can relax, reducing the volume of the thorax and therefore increasing the pressure. This forces air out of the lungs into the lower pressured surroundings.