The diaphragm muscle is used every time we breathe. When the muscle is tightened, it shortens, drops down a bit, and the space for the lungs gets bigger. As the pressure inside this space is less than the pressure of the outside air, air is pulled into the lungs.
When the muscle is relaxed, it goes back into a dome shape, making the space for the lungs smaller and pushing air from them.