Final answer:
The diaphragm separates the thoracic cavity from the abdominal cavity and is located at the base of the lungs and thoracic cavity. The lungs are contained within the thoracic cavity, which is enclosed by the rib cage and protected by the chest wall.
Step-by-step explanation:
The diaphragm separates the thoracic cavity from the abdominal cavity and is located at the base of the lungs and thoracic cavity. It is a dome-shaped skeletal muscle that facilitates breathing.
The lungs are contained within the thoracic cavity, which is enclosed by the rib cage and protected by the chest wall.