The sun provides the initial energetic input for most terrestrial and aquatic ecosystems. Producers (commonly green plants) transform sunlight into food via photosynthesis where light energy is converted to chemical energy. These producers are then eaten by consumers and the energy moves on throughout the food chain.
Consumers can be separated into multiple levels. Primary consumers (also known as herbivores) feed on producers but in turn, are eaten by secondary consumers. These secondary consumers may then be eaten by tertiary consumers. These secondary and tertiary consumers are also known as carnivores.