Histoplasmosis is caused by a fungus that lives in soil, particularly where there's a large amount of bird or bat poop. People can get histoplasmosis by breathing in fungal spores, and infection can be mild or life-threatening.