Tiny algal cells called zooxanthellae live within hard coral polyp tissues.
In truth then, hard corals are composite organisms, part animal and part plant; and this is in no small part a reason for their tremendous success in waters where dissolved nutrients are far from plentiful.
Coral polyps also feed on tiny planktonic creatures suspended in the water column. These are captured by the tentacles and passed to the gut for digestion, with the resultant nutrients shared by the plant cells. In most species the tentacles are used only at night, when they are relatively safe from hungry fish; during the daylight hours they are retracted into the safety of the protective skeleton.
As adults, hard coral animals exist as parts of large cohesive assemblages called colonies, in which only the outermost layer is composed of living polyps. Each coral colony is composed of many genetically identical individual polyps, with succeeding generations built upon the skeletal remains of their forbearers. Occasionally, isolated colonies of hard coral may be found, but far more typically they grow in larger assemblages that we call coral reefs, composed of many colonies of the same or different species.
Each species of hard coral forms colonies of characteristic shape, size, and color, but these traits are subject to modification by local environmental conditions such as wave action, currents, prevailing winds, etc., and are therefore often quite variable. Oceanic and geomorphic processes are therefore partially responsible for explaining how are coral reefs formed.
Hard coral colonies generally exhibit one of three basic growth forms: massive, branching, or plate-like.