Energy flows through ecosystems via food chains and webs. Producers, like plants, capture energy from the sun and convert it to chemical energy during photosynthesis. Consumers obtain energy by eating other organisms and are classified as herbivores, carnivores, or omnivores based on their diets. Energy and nutrients transfer between trophic levels with about 10% traveling to the next level, resulting in pyramids of numbers and biomass that narrow with each increasing trophic level. Key nutrients like carbon and nitrogen cycle through abiotic and biotic factors, being used and reused by different organisms in ecosystems.