Thoracic surgery encompasses a wide range of operations in the chest cavity, primarily focusing on the lungs.