There are a variety of reef structures which can form due to the complex nature of shorelines. However, there are three classic structures that need to be understood: Fringe Reefs; Barrier reefs and Atoll reefs.
For a coral reef to form you need several conditions: shallow water, warm water and of course, reef building corals in attendance. These are the corals which have developed the ability to live in colonies and build up a calcium carbonate skeleton.
The most common way for a coral reef to grow is when a new tropical volcanic island is produced at a hot spot on the oceanic plate or at the plate boundary. The corals require a solid surface to settle on, often found on the new volcanic islands formed.
A basic idea to remember is that coral reefs grow upwards toward sunlight, but as they are marine creatures they must continue to be under the surface of the water, so when they can no longer grow upwards they will begin to grow outwards.
The first reef structure to understand is Fringe Reefs, by far the most common type of coral reef. They grow along the coastline, forming a boarder along the coastline, sometimes even completely surrounding the volcanic island. An example of a Fringe reef is the Ningaloo Reed off Western Australia.
The second most common reef structure is the Barrier Reef. It is formed when the there is a change such as the volcanic island becoming submerged or a rise in sea level. As coral reefs can continue to grow providing the conditions are preferable in terms of sea temperature and sunlight then the coral will continue to grow and even keep up with rising sea levels, meaning the reef will be left offshore, parallel to the volcanic island with a large lagoon between the coral reef and the volcanic island. The best-known example of a barrier reef is also the largest known coral reef, the Great Barrier Reef along the east coast of Australia.
Atoll reefs are the final major coral reef structure to comprehend. They often take a circular shape, enclosing a deep lagoon. Coral atolls are caused by the volcanic island submerging completely underwater. The ring of reef which has continued to grow as the volcanic island submerged is the atoll reef. A great example of an atoll reef is the Lighthouse Reef in the Caribbean Sea.