Well, let's step back and come at this a little slower.
Sunlight energy travels from the sun, through space, and a tiny fraction of it showers onto the earth. An even much tinier part of that energy strikes green plants. These green plants, through the almost magical process known as photosynthesis, capture some of that energy, and store it in the chemical compound known as carbohydrate. The white interior of a potato is nearly 100% carbohydrate. Energy is stored among the bonds between atoms of the carbohydrate molecule.
You could say, then, that in terms of the energy that powers nature's activities, green plants have the "job' of capturing sunlight energy, and making that energy available for powering the earth's other plants and animals. In the drawing above, plants have already relayed sunlight energy into a Monarch Butterfly's caterpillar stage when it ate milkweed leaves, and the adult Monarch Butterfly now being eaten has continued to get sunlight energy stored in plants when it supped flower nectar -- before getting caught by the Ash-throated Flycatcher. (By the way, I know everyone says Monarch Butterflies are too bitter for birds to eat, but I saw what I've sketched above, in a mesquite desert in northern Mexico. Maybe it was a young bird just learning how bitter Monarchs are... )
Anyway, calories in humankind's bread, macaroni, sauerkraut, beans, apples, and bananas are measurements of energy that not long ago was flowing through space as sunlight. In the forest, squirrels eating acorns are taking sunlight energy from oak trees. I'm sure you're getting the picture by now.
Of course, animals don't keep their taken-in energy forever. Animals pass on their energy in four main ways:
Sometimes short-circuits and loops occur in the energy pathway just describe. Forest fires can release sunlight energy stored in the trees' wood and leaves all at once, as heat and light. If a herbivorous deer accidentally eats a carnivorous spider in a curled up leaf, the spider's energy is momentarily shunted back to the "herbivore stage."
But, in general, the flow from sun, to green plants, to herbivores and sometimes to carnivores, to decomposers mostly in the soil, is like a gentle ocean wave sweeping toward landfall. It is inexorable, and beautiful to think about.
Related to this topic there are some useful terms we should know. If we refer to the sequence of organisms through which energy passes, we're speaking of a food chain. If we describe the various alternative routes, short-cuts, diversions, and recyclings that energy is capable of as it flows generally from green plants to decomposers, we're referring to the food web.
Vegetarian deer and squirrels in the forest, or cattle in the field -- the first to use the green plants' stored energy -- are primary consumers, while carnivores, parasites, and scavengers that ultimately eat the deer, squirrels, or cows, are secondary consumers
Now, the Second Law of Thermodynamics states that every energy transformation involves a loss of usable energy, and this is certainly the case as energy is passed along first from green-plant primary consumers, to animal secondary consumers, and ultimately to decomposers. In Eugene Odem's classic textbook Fundamentals of Ecology it's stated that during the course of a year 20,000,000 alfalfa plants weighing 17,850 pounds are needed to fuel 4.5 cows weighing 2,250 pounds, which will satisfy the energy needs of a single 105-pound boy. Here we plainly see energy being lost at every stage.
In F. Wokes's Plant Foods for Human Nutrition, it's calculated that a person can obtain up to twenty-six times more protein per acre by eating spinach than by eating beef. Much less land, then, is needed to produce food for vegetarians, who are primary consumers, than for flesh eaters, who are secondary consumers.
That's one reason so many of us who worry about the destruction of the Earth's ecosystem are vegetarians... If you're curious about vegetarianism, by the way, you might check out the Vegetarianism in a Nutshell pages on the World Wide Web. As a vegetarian since about 1970, I feel obliged to tell any vegetarian candidates that you certainly can remain healthy and strong as a vegetarian, amazingly so, but you need to know a bit about basic human nutritional needs, and eat appropriately, else you can damage your body very badly.