Corals reefs are built up by colonies of coral polyps. They are animals that have within them algae that can synthesize organic matter from sunlight. At night they are filtering organisms that eat plankton that float by, capturing the prey with their arms. Daytime they use the sunlight.
The nutrients needed for photosynthesis can thus be taken from the waste products from the plankton that they eat at night. Thus, just like in a rain forest the nutrients in a coral reef are in the living matter, which is why the water is so clear although the productivity is high. Just like the rain forest, where the soil is so poor and low in nutrients although the productivity is high.
When corals photosynthesize they use carbon dioxide, which is dissolved in the water as carbonic acid. The carbonic acid enables calcium carbonate to be dissolved in the water. When carbon dioxide is removed from the water during photosynthesize, the solubility of calcium carbonate thus decreases. The excess is the source of the calcium that makes up the coral skeleton, the coral reef.
If the corals are stressed, such as by too high water temperatures, they can expel the symbiont algae. This makes them loose their color, so the visual effect is coral bleaching. They can go on eating at night but not photosynthesizing during the day, and the rate of reef growth decreases dramatically.
There are also non-reef-building corals, soft corals and deep-water corals. Corals are related to jellyfish, and spread with the help of polyps that resemble tiny jellyfish. They attach where they find a suitable hard substrate, and start growing in the sessile (attached) form.
The threats to coral reefs are several, and include siltation from dredging. Such siltation can be monitored using a SediMeter™. If it's done in real time, mitigating measures can be taken if siltation is detected at the monitoring station.