Animals need to eat in order to survive. They have to break down energy stored in the chemical bonds of carbon-containing compounds to get energy for their own use. As a result, animals must eat plants, each other or both.
Food webs, simplified versions of which are sometimes called food chains, show the hierarchal relationships between different animals in an ecosystem, or particular environment. These include producers at the very bottom of the hierarchy and various levels of consumers higher up. A decomposer is a particular kind of consumer that displays feeding habits distinct from the others_._
Producers vs. Consumers
The difference between producers and consumers, in this scheme, is about what you might assume from the names of each. The producers generate food for themselves and others; consumers do not produce anything, instead eating producers, other consumers or both. Organisms that eat only producers (i.e., plants) are called herbivores. Animals that eat only consumers (i.e., meat) are called carnivores. Animals such as as humans that usually have diets rich in both plants and animal sources are known as omnivores.
Producers are green plants. Producers' biology allows plants to manufacture their own food through a process called photosynthesis, which is driven by energy from sunlight harnessed by the leaves. Photosynthesis results in glucose production, some of which plants use themselves in growth and other metabolic activities but most of which serves as food for consumers or simply decays when the plant dies.
Consumers are animals. Consumer biology means that they cannot make their own food and must eat other organisms for nourishment. As noted, herbivores eat only plants, carnivores eat only other animals and omnivores eat both. An example containing all of these types of consumers would be a forest that included birds that are strictly carnivores, deer that are herbivores and bears that are omnivores. Bears are also scavengers, meaning that they eat things that are already dead (usually animal flesh).
Levels of Consumers
Consumers occupy different levels within food webs or food chains. In simplest terms, primary consumers are one level above producers and are the herbivores. Secondary consumers are one level up and eat herbivores; tertiary consumers are one level up still and eat herbivores and secondary consumers. At the very highest level are top predators, which no animals hunt for food under ordinary conditions.
Scavengers, such as vultures, are a kind of decomposer, others being bacteria and fungi. The metabolic activities of decomposers return energy to the lowest hierarchal level because it can then be incorporated into plants.