Food webs follow the flow of energy from the sun to plants (producers), from plants to animals that eat them (herbivores), from there to animals that eat plants and animals (omnivores) and on to the animal eaters (carnivors). When plants and animals die, they need to get broken down into the nutrients that help make soil rich, there are animals and organisms like fungi that do that job (decomposers).