Pneumocystis jirovecii pneumonia is common in immunocompromised patients. It has significant mortality, which is why it is important to consider an infection with P. jirovecii in these patients and use appropriate diagnostic methods. When the clinical features indicate P. jirovecii pneumonia, we perform imaging studies (chest radiograph and chest computer tomography), take blood for biochemical analysis (lactate dehydrogenase and beta-D-glucan) and respiratory specimens for direct microscopic examination (conventional staining and direct immunofluorescence) or polymerase chain reaction. The best specimen is the bronchoalveolar lavage and the most sensitive and specific method is polymerase chain reaction, with which we can even detect colonization with P. jirovecii. The best way to differentiate colonization from a symptomatic infection is by taking into consideration several methods described above.