Is coral an animal or a plant?
Corals are members of the Animal Kingdom. As larvae, called planulae, they're free-swimming. An individual mature coral animal is called a polyp. This sea anemone-like creature is structured like a tiny hollow sack. Around its mouth are stinging tentacles that enable it to capture food.
Like insects, polyps have an exoskeleton. A planula builds its skeleton by secreting calcium carbonate from its base. A planula joins a reef by attaching its skeleton to that of the rest of the colony. A reef of corals, in effect, share a communal skeleton.
A planula may also attach to a rock and possibly begin a reef of its own. After settling and becoming a polyp, it will asexually reproduce to form a series of interconnected polyps, making a colony. Once a colony is big enough, it will have energy to reproduce sexually, forming free-swimming planulae that may settle away from the group.
Not only does this communal skeleton protect polyps from potential predators, like fish, but it enables them to share food too. Polyps can eat tiny animals, but they largely subsist on nutrients produced by algae that live sandwiched between coral tissue layers. Inside the communal skeleton is a gastrovascular network by which the colony shares these nutrients.
A coral reef could be said to be both animal and plant.