It is relatively rare in people with normal immune systems but common among people with weakened immune systems, such as premature or severely malnourished children, the elderly, and especially AIDS patients, in whom it is most commonly observed today. PCP can also develop in patients who are taking immunosuppressant medications (e.g. patients who have undergone solid organ transplantation) and in patients who have undergone bone marrow transplantation.
The organism is distributed worldwide
Since the start of the HIV pandemic, PCP has been closely associated with AIDS. Because it only occurs in an immunocompromised host, it may be the first clue to a new AIDS diagnosis if the patient has no other reason to be immunocompromised (e.g. taking immunosuppressive drugs for organ transplant). An unusual rise in the number of PCP cases in North America, noticed when physicians began requesting large quantities of the rarely used antibiotic pentamidine, was the first clue to the existence of AIDS in the early 1980s.
Prior to the development of more effective treatments, PCP was a common and rapid cause of death in persons living with AIDS. Much of the incidence of PCP has been reduced by instituting a standard practice of using oral co-trimoxazole to prevent the disease in people with CD4 counts less than 200/mm³. In populations that do not have access to preventive treatment, PCP continues to be a major cause of death in AIDS.
In immunocompromised patients (e.g. cancer patients on chemotherapy, or persons living with AIDS with a CD4+ T-cell count below 200/μl), prophylaxis with regular pentamidine inhalations or sulfamethoxazole/trimethoprim (co-trimoxazole or TMP-SMX) may be necessary to prevent PCP.

Pneumocystis infection can also be diagnosed by immunofluorescent or histochemical staining of the specimen, and more recently by molecular analysis of polymerase chain reaction products comparing DNA samples. Notably, simple molecular detection of Pneumocystis jirovecii in lung fluids does not mean that a person has Pneumocystis pneumonia or infection by HIV. The fungus appears to be present in healthy individuals also in the general population.
Pentamidine is less often used as its major limitation is the high frequency of side effects. These include acute pancreatitis, renal failure, hepatotoxicity, leukopenia, rash, fever and hypoglycaemia.
The name P. jirovecii, to distinguish the organism found in humans from physiological variants of Pneumocystis found in other animals, was first proposed in 1976, in honor of Otto Jirovec, who described Pneumocystis pneumonia in humans in 1952. After DNA analysis showed significant differences in the human variant, the proposal was made again in 1999 and has come into common use; P. carinii still describes the species found in rats and that name is typified by an isolate from rats. The International Code of Botanical Nomenclature (ICBN) requires that the name to be spelled jirovecii rather than jiroveci. The latter spelling originated when Pneumocystis was believed to be a protozoan, rather than a fungus, and therefore was spelled using the International Code of Zoological Nomenclature; both spellings are commonly used. A change in the ICBN in 2005 now recognizes the validity of the 1976 publication, making the 1999 proposal redundant, and cites Pneumocystis and P. jirovecii as examples of the change in ICBN Article 45, Ex 8. The name P. jirovecii is typified (both lectotypified and epitypified) by samples from human autopsies dating from the 1960s.
The term PCP, which was widely used by practitioners and patients, has been retained for convenience, with the rationale that it now stands for the more general Pneumocystis pneumonia rather than Pneumocystis carinii pneumonia.
Pneumocystis was redescribed as a human pathogen in 1942 by two Dutch investigators, van der Meer and Brug who found it in three new cases: a 3-month-old infant with congenital heart disease and in 2 of 104 autopsy cases - a 4-month-old infant and a 21-year-old adult. There being only one described species in the genus, they considered the human parasite to be P. carinii. Nine years later (1951) Dr. Josef Vanek at Karls-Universität in Prague, Czechoslovakia showed in a study of lung sections from sixteen children that the organism labelled "P. carinii" was the causative agent of pneumonia in these children. The following year (1952) Jírovec reported "P. carinii" as the cause of interstitial pneumonia in neonates. Following the realization that Pneumocystis from humans could not infect experimental animals such as rats, and that the rat form of Pneumocystis differed physiologically and had different antigenic properties, Frenkel was the first to recognize the human pathogen as a distinct species. He named it Pneumocystis jirovecii (see nomenclature above). There has been controversy over the relabeling of P. carinii in humans as P. jirovecii, which is why both names still appear in publications. However, only the name P. jirovecii is used exclusively for the human pathogen, whereas the name P. carinii has had a broader application to many species. Frenkel and those before him, believed that all Pneumocystis were protozoans, but soon afterwards evidence began accumulating that Pneumocystis was a fungal genus. Recent studies show it to be an unusual, in some ways a primitive genus of Ascomycota, related to a group of yeasts. Every tested primate, including humans, appears to have their own type of Pneumocystis that is incapable of cross-infecting other host species and has co-evolved with each mammal species. Currently only 5 species have been formally named: P. jirovecii from humans, P. carinii as originally named from rats, P. murina from mice, P. wakefieldiae also from rats, and P. oryctolagi from rabbits.
Historical and even recent reports of P. carinii from humans are based upon older classifications (still used by many, or those still debating the recognition of distinct species in the genus Pneumocystis) which does not mean that the true P. carinii from rats actually infects humans. In an intermediate classification system, the various taxa in different mammals have been called formae speciales or forms. For example the human "form" was called Pneumocystis carinii f. [or f. sp.] hominis, while the original rat infecting form was called Pneumocystis carinii f. [or f. sp.] carinii. This terminology is still used by some researchers. The species of Pneumocystis species originally seen by Chagas have not yet been named as distinct species. Many other undescribed species presumably exist and those that have been detected in many mammals are only known from molecular sample detection from lung tissue or fluids, rather than by direct physical observation. As of yet, they are cryptic taxa.
Pneumocystis species cannot be grown in culture. Therefore, there is a limitation to the availability of the human disease causing agent, P. jirovecii. Hence, investigation of the whole genome of a Pneumocystis is largely based upon true P. carinii available from experimental rats which can be maintained with infections. The project is described in the site linked here. Genetic material of other species, such as P. jirovecii can be compared to the genome of P. carinii. Pneumocystis Genome Project