Cavities occasionally are encountered on thoracic images. Their differential diagnosis is large and includes, among others, various infections, autoimmune conditions, and primary and metastatic malignancies. We offer an algorithmic approach to their evaluation by initially excluding mimics of cavities and then broadly classifying them according to the duration of clinical symptoms and radiographic abnormalities. An acute or subacute process (< 12 weeks) suggests common bacterial and uncommon nocardial and fungal causes of pulmonary abscesses, necrotizing pneumonias, and septic emboli. A chronic process (≥ 12 weeks) suggests mycobacterial, fungal, viral, or parasitic infections; malignancy (primary lung cancer or metastases); or autoimmune disorders (rheumatoid arthritis and granulomatosis with polyangiitis). Although a number of radiographic features can suggest a diagnosis, their lack of specificity requires that imaging findings be combined with the clinical context to make a confident diagnosis.