A food chain describes how energy and matter move between organisms in an ecosystem. It typically consists of producers, primary consumers, secondary consumers, tertiary consumers, and decomposers. Producers, such as plants and algae, use photosynthesis to convert sunlight into food. Primary consumers eat producers. Secondary consumers eat primary consumers, and tertiary consumers eat secondary consumers or other tertiary consumers. Decomposers, like fungi and bacteria, break down the remains of dead organisms and return nutrients to the soil or water.