When breathing in, the diaphragm pulls down so that the size of the lungs increases, allowing air to enter the lungs.
When breathing out, the diaphragm rests and goes up making a dome shape, decreasing the size of the lungs and pushing air out.
This increases the surface area of the air so that there is more oxygen that the lungs can hold.