Plants are the primary source of food for all animals. Herbivores eat plants directly while carnivores eat herbivores that get their nourishment by eating animals. Plants also produce oxygen during the process of photosynthesis that is essential for almost all life forms including animals to survive.
Plants and fungi form a symbiotic relation that benefits both of them. In the soil there are many forms of fungi that enter the roots of plants and form their colonies there. The fungi feed on the sugars produced by plants in their root cells. In return the fungi are able to extract water and nutrients from the soil around the roots of the plants and transport them to the root cells. This in a way expands the surface area of the plant roots by a large extent and makes it easier for them to access water and nutrients.
Many forms of fungi are eaten by animals. Mushrooms and truffles are examples of fungi eaten by humans. Though fungi form a small part of the human diet, many animals in the wild are dependent on fungi for their requirement of protein.