Producers are organisms that can synthesise their own food. They use solar energy and produce food by a process called photosynthesis. Example: Green plants.
Consumers are organisms that depend on producers, as well as other organisms for their nutritional requirement. Examples are animals and human beings.
Decomposers are microorganisms that depend on dead and decaying organic matter for their nutritional requirements. Examples: Fungi, bacteria, and earthworms.