Fungi are closely related to animals, at least more closely than either is related to plants. There are other groups whose potential inclusion within Fungi has been debated. The placement of the two groups of "higher" fungi is secure; these are the Ascomycota (truffles, lichens, morels, and most yeasts including those used in brewing and bakery) and the Basidiomycota (mushrooms, puffballs, smuts, rusts, and certain yeasts). Trichomycetes are fungi that are obligate symbiotes of insects, usually commensal (that is, harmless but not helpful to the host) but sometimes parasitic.
The highly simplified, single-celled, parasitic Microsporidia are now generally placed within Fungi as well. The most basal (primitive) group now generally placed within Fungi is the Chytridiomycota; these are the organisms thought to be responsible for the decline of some frogs and other amphibians worldwide.
Most slime molds (Mycetozoa and several other groups) share a more recent common ancestor with plants than with fungi and animals, so they should not be included within Fungi on the basis of phylogeny. One group of slime molds, the Phytomyxea, predates the last common ancestor of plants and animals-fungi, so they should not be included within Fungi either..