What is the Purpose of these Categories?
These categories reflect the role an organism may play in an ecosystem, based on the way they gain food which is converted to energy.
Producers are organisms that produce their own food/energy. These organisms tend to be either phototrophs that use photosynthesis or chemotrophs that use chemosynthesis to create energy from other sources, such as light or chemicals. Most plants are producers.
Consumers need to consume other organisms to gain energy. This includes herbivores (that consume plants), omnivores (that have a mixed diet) and carnivores (that consume other animals). Most animals are consumers.
Decomposers and Detritivores
Decomposers and detritivores are organisms that break down deceased/decaying organic matter. They are aid in returning nutrients to the soil. The two terms only differ by the method of breakdown, with detritivores requiring internal digestion and decomposers using biochemical reactions with no need for ingestion. A variety of bacteria and a variety of fungi are decomposers. A number of invertebrates, including earthworms are an example of detritivores.