A food chain refers to the transfer sequence of matter and energy in the form of food from organism to organism.
In an energy pyramid, energy flows from one trophic level to another and therefore causing loss.
Producer- Plants are the producers of a food chain. They trap sunlight as energy and consume it.
Primary consumer- When primary consumers( snails, butterflies) consume plants, 90% of the energy is lost as heat and undigested materials. They only have 10% of the energy.
Secondary consumer- When secondary consumers( frog, rat, snake) consume primary consumers, again 10% of energy is passed and 90% of energy is lost in the environment.
Tertiary consumer- 90% of energy is lost in tertiary consumers( lion, eagle, tiger) at the time of consuming secondary consumers and 10% is gained.