The thoracic cavity is the chamber of the human body (and other animal bodies) that is enclosed by the ribcage and the diaphragm. It houses

  1. the lungs,
  2. the heart,
  3. the thoracic aorta,
  4. the main pulmonary artery and its branches,
  5. the thymus gland,
  6. the trachea and bronchi and
  7. the esophagus.

It contains the potential space called the pleural cavity and the mediastinum.

If the thoracic cavity is breached from the outside, as by a bullet wound or knife wound, a pneumothorax, or air in the cavity, usually results, often leading to one or both lungs collapsing and requiring immediate medical attention.