An ecosystem consists of biotic and abiotic components that interact. Energy from the sun is absorbed by producers like plants through photosynthesis and transfers through consumers to decomposers. Organisms fill different roles as producers, primary consumers, secondary consumers, decomposers and form complex food webs. Nutrient cycles like carbon and nitrogen allow recycling of essential elements. Limiting factors shape ecosystem structure and function.