A fungus is a plant-like organism, but unlike a plant, it lacks the chlorophyll. This means a fungus must absorb food from other sources, such as trash in landfills. They are nature's recycling centers, consuming trash and turning it into soil. Since they don't use light to make food, like plants, they thrive in damp and dark places. A yeast fungus is used to make alcohol in beer, and also to make bread rise.
There are more than 100,000 different species of fungi. Examples of "good" fungi are edible mushrooms, or the yeast fungus used to make beer and bread. "Bad" fungus isn't really bad, it is just good fungus trying to do its job too early to an organism. Fungi are supposed to "eat" things when they are dead, but sometimes they start chomping away while an organism is still alive. Ringworm that forms on the foot and scalp is an example of "bad" fungi run amok.
Another species is called "smut fungi," because they live in the soil and are plant parasites. The most common variety is corn smut, which feeds on the base and midrib of leaves in a cornstalk, and on young ears of corn. Eventually, the fungus produces small "tumors" on the infected plant, covered with a greenish-white layer and filled with powdery dark spores. These help the fungus flourish by resisting dry climate spells and low temperatures. But some smut fungus is actually edible, sold in cans in Mexico and known as "cuitlacoche" or "huitlacoche."