How is a coral reef formed?

Coral reefs consist of skeletons of small animals, called madrepores, and stacked one on top of the other for centuries. These corals obtain minerals from the seawater and build a hard structure of limestone. These hard portions of dead corals form the actual coral reefs, the corals that are alive are found on the surface of the reef. 

Since the corals live in a symbiotic relationship with tiny algae that need light, they are mainly found in sun-lit, warm flat waters of the tropics. The largest reef of the world is the 2000-km long barrier reef off the northern coast of Australia.