Thoracentesis is a way of removing air or excess fluid from the space around your lungs, called the pleural space.
Fluid can build up inside the pleural cavity due to congestive heart failure, infections, cancer, autoimmune diseases, or other reasons. Thoracentesis allows a doctor to remove some of the fluid so that they can see what's causing your condition. Removing some of the fluid can also help relieve symptoms.
Your doctor will use an ultrasound to see where the fluid is, then insert a needle into the correct location. A catheter will be placed to help drain the fluid.