The breathing mechanism involves two processes:
1. Inhalation
2. Exhalation
During inhalation, the ribs move in an upward and downward direction, whereas the diaphragm is pushed downwards and flattens. This causes a decrease in pressure of the chest cavity or thoracic cavity. Due to the pressure difference, air from the atmosphere rushes into the lungs, as air moves from a high-pressure area to low pressure area.
During exhalation, the ribs move inward and downwards to their original position, whereas the diaphragm also moves downwards to its original state. During exhalation, the volume of the chest cavity decreases, thereby increasing the pressure of the thoracic cavity and the lungs. Thus, the air pressure inside the lungs will be higher than that of the air in the atmosphere. This causes the air in the lungs to be pushed out through the nose.