To understand the Coral Reef Food Web, first read about the Coral Reef Biome using this link.
Then read about the different trophic levels of a typical Food Chain (below). The trophic level is the position that an organism (plant or animal) occupies in a food chain - what it eats, and what eats it.
Energy flows through an ecosystem as one animal eats another animal or plant.
Plants make (produce) their own food using water, sunlight and carbon dioxide (photosynthesis). Plants start the food chain. There are more plants than any other living thing because they are the bottom of the food chain. They provide the energy for everything else. They are the PRODUCERS.
The animals (insects, mice, chipmunks, squirrels, rabbits, deer) that mostly eat plants are called the herbivores. There are fewer herbivores than there are plants because each herbivore needs a lot of plant matter to live. Herbivores feed directly on the producers. They are the PRIMARY CONSUMERS.
Animals (spiders, birds, snakes) who eat the primary consumers (herbivores) are the SECONDARY CONSUMERS. There are fewer secondary consumers than there are primary consumers because each secondary consumer needs to eat a lot of primary consumers to live.
Animals (fox, coyotes, eagles, owls) who eat the 1st & 2nd consumers are carnivores (they eat meat). They are the TERTIARY CONSUMERS. There are fewer tertiary consumers than there are secondary consumers because each tertiary consumer needs to eat a lot of secondary consumers to live.
Because there are fewer animals as you move up the food chain, it is really a food pyramid with the big carnivores needing to eat the most and so being the rarest of the animal kingdom. Because animals eat so many things, the food chain has many overlapping parts, so is really a FOOD WEB.
Last but not least, the DECOMPOSERS and DETRIVORES eat and so recycle dead animals and plants (mushrooms, fungi, insects, bacteria). Nothing is wasted.