When an organism excretes or it dies, its matter is acted on by larger organisms, such as worms, insect larvae and larger fungi. These organisms digest the matter into smaller pieces. They are too small to 'eat' solid food, so they release chemicals onto the food and form a liquid nutrient soup. They absorb nutrients from this soup, but some nutrients seep into the soil to be used by plants. Decomposers therefore recycle matter in ecosystems.
Compost heaps make use of the process of decomposition.
The nutrients released by the decomposers in the compost heap are placed on and in the soil surrounding plants. When these transformations occur, energy is not destroyed and neither is energy made. Transformation of energy just exchanges one form of energy for another. In physics, the law of conservation of Energy says that in an isolated, closed system, the amount of energy is constant. This idea of energy transformation without the destruction or formation of energy within a system is stated as a law in the field of science.