A sputum culture is a test used to detect and identify bacteria or fungi that infect the lungs or breathing passages. It involves collecting a sample of sputum (mucus that is coughed up from the lower airways) and allowing any microorganisms present to grow in a controlled environment. This test is essential for diagnosing conditions like pneumonia, bronchitis, tuberculosis, and other respiratory infections.