Food chain: The flow of food from sun to autotrophs, from autotrophs to herbivores and from herbivores to carnivores is called food chain. A food chain can have two levels or five to six levels also.
Food web: When an organism is eaten by two or more other kinds of organisms, instead of straight chain an interlinked chain is formed, is termed as food web.

Smaller the food chain the energy available for the next level of consumer in such a chain is more. As the loss of energy at each step takes place and very little energy is left after four trophic levels.
The green plants in terrestrial ecosystem capture about 1% of the sun’s energy and convert it into food energy. When green plants are eaten by primary consumers—a great deal of energy is lost for the life processes and only 10% of the energy is available for the next level of consumers.