Diagnosis typically involves a combination of a physical examination and diagnostic tests. These may include a chest X-ray, blood tests, sputum tests, and sometimes a CT scan or a bronchoscopy. The goal is to identify the causative agent and assess the extent of the infection.