Producers like plants, algae and some bacteria capture energy from sunlight through photosynthesis. Consumers obtain energy by eating other organisms and include herbivores, carnivores, omnivores and scavengers. Decomposers break down dead organisms and return nutrients to the soil, functioning like nature's recyclers. Food chains show the transfer of energy between organisms, always beginning with a producer and ending with a consumer. Climate change can affect ecosystems by altering environmental conditions.