Everything is connected to everything else in a food chain. Although biological systems are much more complicated, and consist of many food links and chains, a basic food chain helps to explain the major links in any food web.
In a food chain, energy from the sun is captured by plant photosynthesis and flows from one tropic level to another tropic level of the chain. A trophic level is composed of organisms that make a living in the same way; they are all plants, herbivores or carnivores.Herbivores get their energy by eating plants or plant products, carnivores eat herbivores, and detritivores consume waste products and help decompose materials.
Waste products are produced at all levels. Scavengers, detritivores, and decomposers like bettles, crows and catfish eat waste products but microbes finish the job of decomposition.
There are many types of food chains within an ecosystem. A rain forest floor or a woodland stream in a forested area, a salt marsh, or an ocean floor in very deep areas where all sunlight is extinguished 1000's of meters above.