When a person takes a breath, the air enters through the nostrils and continues its passage through the pharynx, larynx, trachea, bronchi, bronchioles, lungs and alveoli. Gas exchange takes place in the alveoli, where oxygen from the air diffuses into the bloodstream through capillaries, and carbon dioxide is transported from these capillaries to the alveoli.
Carbon dioxide then travels back up through the respiratory tract to be expelled from the body by exhalation. The muscles that are important for respiration are the diaphragm and rib muscles. These muscles either relax or contract when a person breathes. When a person inhales, these muscles contract. Exhalations cause them to relax. The process of respiration also involves the chest expanding during an inhalation, and it contracts during an exhalation.