How does a mushroom use dead log for food that it is living on?

A mushroom doesn't use the log for food in the same way that animals eat. Mushrooms are fungi, and they release enzymes into the wood of the dead log that break it down into simple sugars that they can absorb and use for energy. This process is called external digestion.

The mycelium, a meshwork of fungal hyphae, spreads through the log, breaking down the lignin and cellulose, which are the two main components of wood. The lignin and cellulose are converted into simple sugars, which the fungus can absorb and use for energy.

In addition to providing a source of food, decaying logs also provide a stable and moist environment for mushrooms to grow. The environment is important because mushrooms need a specific amount of humidity and temperature to thrive.