They are decomposers, they breakdown dead plants and animals and release nutrients into the soils for plants to use.
In a forest, decomposers help other organisms survive because they they put nutrients into the soil that plants use to grow.