Most of the coral reefs we can see today were formed after the last glacial period when melting ice caused the sea level to rise and flood the continental shelves. This means that most modern coral reefs are less than 10,000 years old. As communities established themselves on the shelves, the reefs grew upwards, pacing rising sea levels. Reefs that rose too slowly could become drowned reefs. They are covered by so much water that there was insufficient light. Coral reefs are found in the deep sea away from continental shelves, around oceanic islands and as atolls. The vast majority of these islands are volcanic in origin. The few exceptions have tectonic origins where plate movements have lifted the deep ocean floor on the surface.
In 1842 in his first monograph, The Structure and Distribution of Coral Reefs, Charles Darwin set out his theory of the formation of atoll reefs, an idea he conceived during the voyage of the Beagle. He theorized uplift and subsidence of the Earth's crust under the oceans formed the atolls. Darwin’s theory sets out a sequence of three stages in atoll formation. It starts with a fringing reef forming around an extinct volcanic island as the island and ocean floor subsides. As the subsidence continues, the fringing reef becomes a barrier reef, and ultimately an atoll reef.
As the island and ocean floor subside, coral growth builds a fringing reef, often including a shallow lagoon between the land and the main reef.
As the subsidence continues, the fringing reef becomes a larger barrier reef further from the shore with a bigger and deeper lagoon inside.
Ultimately, the island sinks below the sea, and the barrier reef becomes an atoll enclosing an open lagoon.
Darwin predicted that underneath each lagoon would be a bed rock base, the remains of the original volcano. Subsequent drilling proved this correct. Darwin's theory followed from his understanding that coral polyps thrive in the clean seas of the tropics where the water is agitated, but can only live within a limited depth range, starting just below low tide. Where the level of the underlying earth allows, the corals grow around the coast to form what he called fringing reefs, and can eventually grow out from the shore to become a barrier reef.
A fringing reef can take ten thousand years to form, and an atoll can take up to 30 million years.
Where the bottom is rising, fringing reefs can grow around the coast, but coral raised above sea level dies and becomes white limestone. If the land subsides slowly, the fringing reefs keep pace by growing upwards on a base of older, dead coral, forming a barrier reef enclosing a lagoon between the reef and the land. A barrier reef can encircle an island, and once the island sinks below sea level a roughly circular atoll of growing coral continues to keep up with the sea level, forming a central lagoon. Barrier reefs and atolls do not usually form complete circles, but are broken in places by storms. Like sea level rise, a rapidly subsiding bottom can overwhelm coral growth, killing the coral polyps and the reef, due to what is called coral drowning. Corals that rely on zooxanthellae can drown when the water becomes too deep for their symbionts to adequately photosynthesize, due to decreased light exposure.
The two main variables determining the geomorphology, or shape, of coral reefs are the nature of the underlying substrate on which they rest, and the history of the change in sea level relative to that substrate.
The approximately 20,000-year-old Great Barrier Reef offers an example of how coral reefs formed on continental shelves. Sea level was then 120 m (390 ft) lower than in the 21st century. As sea level rose, the water and the corals encroached on what had been hills of the Australian coastal plain. By 13,000 years ago, sea level had risen to 60 m (200 ft) lower than at present, and many hills of the coastal plains had become continental islands. As the sea level rise continued, water topped most of the continental islands. The corals could then overgrow the hills, forming the present cays and reefs. Sea level on the Great Barrier Reef has not changed significantly in the last 6,000 years, and the age of the modern living reef structure is estimated to be between 6,000 and 8,000 years. Although the Great Barrier Reef formed along a continental shelf, and not around a volcanic island, Darwin's principles apply. Development stopped at the barrier reef stage, since Australia is not about to submerge. It formed the world's largest barrier reef, 300–1,000 m (980–3,280 ft) from shore, stretching for 2,000 km (1,200 mi).
Healthy tropical coral reefs grow horizontally from 1 to 3 cm (0.39 to 1.18 in) per year, and grow vertically anywhere from 1 to 25 cm (0.39 to 9.84 in) per year; however, they grow only at depths shallower than 150 m (490 ft) because of their need for sunlight, and cannot grow above sea level.
As the name implies, the bulk of coral reefs is made up of coral skeletons from mostly intact coral colonies. As other chemical elements present in corals become incorporated into the calcium carbonate deposits, aragonite is formed. However, shell fragments and the remains of calcareous algae such as the green-segmented genus Halimeda can add to the reef's ability to withstand damage from storms and other threats. Such mixtures are visible in structures such as Eniwetok Atoll.