This document discusses the structure and function of the lungs. The lungs are located in the chest cavity and are protected by the rib cage. They are made up of branching airways called bronchi that divide into smaller bronchioles and terminate in tiny air sacs called alveoli. The lungs work with the diaphragm and intercostal muscles to inhale air which enters the alveoli where gas exchange occurs as oxygen passes into the blood and carbon dioxide passes out.