When we examine the corals of living coral reefs, we find that they are really “homes” of millions of tiny animals as seen in the following video,
https://video.nationalgeographic.com/video/101-videos/coral-reefs-101
As shown in the video, the animals secrete a bone-like material around themselves, This is the coral (calcium carbonate or limestone). At many locations on land, we find vast beds of limestone rich in fossils of the types of animals common to corral reefs. These beds of limestone can only have been formed by corals and associated organisms living in shallow ocean waters over millions of years. By later earth processes some these beds of limestone rich in fossils were uplifted so that now they are well above sea level. The following video gives one example
https://mpt.pbslearningmedia.org/resource/ket09.sci.ess.structure.falls/the-falls-of-the-ohio/#.Whhpta3MyV4