The body has two lungs.
Each lung is enclosed in a pleural cavity, which is an airtight area within the chest. Each pleural cavity is separate and independent of the other pleural cavity.
If an object punctures the chest wall and allows air to enter one pleural cavity, the lung within that cavity begins to collapse (not expand fully). The other lung, however, will not collapse. Any degree of collapse, though, interferes with the ability to inhale a sufficient amount of air. A buildup of pressure from air or blood around the collapsed lung can also cause compression of the heart and the other lung.
The heart is located in the pericardial cavity. The pericardial cavity is located between the lungs in a space called the mediastinum. In addition to the heart, the mediastinum contains the lower part of the trachea, part of the esophagus, large blood vessels, and the thymus.