It begins with the energy of the sun,then plants or producers take in the energy.
Consumers eat the producers.A second consumer may eat the first one and so one until the top predator is on the food chain.Decomposers take in the nutrients of the top predators when they die.