Breathing, or ventilation, is the two-step process of drawing air into the lungs (inhaling) and letting air out of the lungs (exhaling). Inhaling is an active process that results mainly from contraction of a muscle called the diaphragm. Exhaling is typically a passive process that occurs mainly due to the elasticity of the lungs when the diaphragm relaxes.
Breathing is one of the few vital bodily functions that can be controlled consciously, as well as unconsciously. Conscious control of breathing is common in many activities, including swimming and singing. There are limits on the conscious control of breathing, however. If you try to hold your breath, for example, you will soon have an irrepressible urge to breathe.
Unconscious breathing is controlled by respiratory centers in the medulla and pons of the brainstem. They respond to variations in blood pH by either increasing or decreasing the rate of breathing as needed to return the pH level to the normal range.
Nasal breathing is generally considered to be superior to mouth breathing because it does a better job of filtering, warming, and moistening incoming air. It also results in slower emptying of the lungs, which allows more oxygen to be extracted from the air.