The respiratory system has three main functions: (1) to provide oxygen to cells, (2) to remove carbon dioxide from cells, and (3) to remove water from cells. Air passes through the nose, pharynx, trachea, bronchi, and into tiny sacs called alveoli in the lungs where gas exchange occurs between the blood and air. The diaphragm and rib muscles expand the chest during inhalation, allowing air to rush into the lungs due to the created vacuum. During exhalation, the muscles relax and the chest contracts, pushing air back out.