During inhalation, the diaphragm contracts and becomes flat and the chest cavity becomes large. The contraction of the diaphragm creates a vacuum, which sucks air into the lungs. During exhalation, the diaphragm relaxes and comes back to its dome-like shape, and the air is removed out of the lungs.