Mushrooms that are mycorrhizal are not decomposers. Mycorrhizal mushrooms seem to pop up out of the ground. If a mushroom is a decomposer, you will normally see it attached to a dead tree or on rotting leaves. The decomposer mushroom stretches thin filaments throughout the decaying material and sends out a chemical that helps break the soft wood into nutrients. The decomposing mushroom plays an important role in any habitat by helping to keep dead matter from accumulating.
Mushrooms are food for many kinds of animals and insects.
Over time, some species of mushroom have developed poisons that protect them from being eaten. Their poisons are mostly effective against eager vertebrates, such as mice, gray squirrels, and flying squirrels, but some poisons may also protect a mushroom from snacking insects. If the mushroom is mycorrhizal , the poisons do not affect the associated tree. Named for its unusual feet, the flat-footed fly is a frequent mushroom visitor. The reason for its strange adaptation is not yet understood.