Mycorrhizal fungi are important for plant nutrition. This type of fungus grows around the foots of plants, and traces of the fungus are found both around and inside the root. These fungi exist in a sort of symbiotic state with the plant they are attached to. The fungi provide a pipeline to nutrients outside the range of the plant's existing root system, while the plant provides the fungi with the sugar that it needs to live.
Soil is constantly being renewed. As organic matter is added back into the soil, either naturally such as when a plant dies, or artificially (such as when a person adds compost to the soil in their garden), it needs to be broken down and incorporated into the soil. Special types of fungi accomplish this. They are called decomposers. Without them, soil would not accumulate the nutrients that it requires in order to grow healthy plants.
Some fungi that grow in the ground are actually edible, like their mushroom relatives that grow above the level of the soil. The most well-known example of this is the truffle. Certain species of the beneficial fungi that help plants obtain nutrients develop round bodies that are edible, and are known as truffles. Some of these varieties are very rare, and are extremely valuable because of their flavor, rarity and popularity in the world of gourmet cooking.
Many types of pathogenic fungi are harmful, and will kill plants that they are able to attack. Other pathogenic fungi however, attack and kill other organisms that kill plants instead of the plants themselves. Nematodes are a type of worm that kills many plants, but certain pathogen fungi species look upon them as a food source, and are helpful in keeping plant life healthy through control of the nematode population.