Corals are marine invertebrates in the class Anthozoa of phylum Cnidaria. They typically live in compact colonies of many identical individual polyps. The group includes the important reef builders that inhabit tropical oceans and secrete calcium carbonate to form a hard skeleton.
A coral "group" is a colony of myriad genetically identical polyps. Each polyp is a sac-like animal typically only a few millimeters in diameter and a few centimeters in length. A set of tentacles surround a central mouth opening. An exoskeleton is excreted near the base. Over many generations, the colony thus creates a large skeleton that is characteristic of the species. Individual heads grow by asexual reproduction of polyps. Corals also breed sexually by spawning: polyps of the same species release gametes simultaneously over a period of one to several nights around a full moon.
Although some corals can catch small fish and plankton, using stinging cells on their tentacles, most corals obtain the majority of their energy and nutrients from photosynthetic unicellular dinoflagellates in the genus Symbiodinium that live within their tissues. These are commonly known as zooxanthellae and the corals that contain them are zooxanthellate corals. Such corals require sunlight and grow in clear, shallow water, typically at depths shallower than 60 metres (200 ft). Corals are major contributors to the physical structure of the coral reefs that develop in tropical and subtropical waters, such as the enormous Great Barrier Reef off the coast of Queensland, Australia.
Other corals do not rely on zooxanthellae and can live in much deeper water, with the cold-water genus Lophelia surviving as deep as 3,000 metres (9,800 ft). Some have been found on the Darwin Mounds, north-west of Cape Wrath, Scotland. Corals have also been found as far north as off the coast of Washington State and the Aleutian Islands.
Explanation from: https://en.wikipedia.org/wiki/Coral