How was the great barrier reef made or built?

The great barrier reef was formed over years and years of growth. Coral reefs are made up of the skeletons of dead coral