The substantial decline in the Pneumocystis jirovecii pneumonia (PCP) incidence in HIV-infected patients after the introduction of antiretroviral therapy (ART) in resource-rich settings and the growing number of non-HIV-infected immunocompromised patients at risk leads to considerable epidemiologic changes with clinical, diagnostic, and treatment consequences for physicians. HIV-infected patients usually develop a subacute course of disease, while non-HIV-infected immunocompromised patients are characterized by a rapid disease progression with higher risk of respiratory failure and higher mortality. The main symptoms usually include exertional dyspnea, dry cough, and subfebrile temperature or fever. Lactate dehydrogenase may be elevated. Typical findings on computed tomography scans of the chest are bilateral ground-glass opacities with or without cystic lesions, which are usually associated with the presence of AIDS. Empiric treatment should be initiated as soon as PCP is suspected. Bronchoalveolar lavage has a higher diagnostic yield compared to induced sputum. Immunofluorescence is superior to conventional staining. A combination of different diagnostic tests such as microscopy, polymerase chain reaction, and (1,3)-β-D-glucan is recommended. Trimethoprim/sulfamethoxazole for 21 days is the treatment of choice in adults and children. Alternative treatment regimens include dapsone with trimethoprim, clindamycin with primaquine, atovaquone, or pentamidine. Patients with moderate to severe disease should receive adjunctive corticosteroids. In newly diagnosed HIV-infected patients with PCP, ART should be initiated as soon as possible. In non-HIV-infected immunocompromised patients, improvement of the immune status should be discussed (e.g., temporary reduction of immunosuppressive agents). PCP prophylaxis is effective and depends on the immune status of the patient and the underlying immunocompromising disease.