chest tube
A chest tube is a drainpipe for the space around the lung. When air or fluid has crowded into the pleural space and the lung cannot re-expand, a flexible tube is slid in between the ribs so that the unwanted contents can flow out and the lung can fill the chest again.
The clever part is what the tube connects to: a one-way drainage system, classically a water-seal that lets air and fluid escape on exhalation but blocks anything from being sucked back in. Suction can be added to coax a stubborn leak closed. As the air or fluid leaves and the lung re-expands, the pleural surfaces come back together, which is exactly what is needed for a leak to heal.
Chest tubes range from large-bore tubes for thick blood or pus to thin pigtail catheters for air or thin fluid; ultrasound or CT often guides safe placement. They are removed once the lung has stayed up and drainage has settled. Like any procedure that enters the chest, insertion carries risks — bleeding, infection or injury to nearby organs — so it is done with care and checked afterward by imaging.
A persistent bubbling in the water seal during exhalation signals an ongoing air leak from the lung; bubbling that stops usually means the leak has sealed and the tube may soon come out.