Here's how it works:
* Formation: Limestone forms primarily from the accumulation of the shells and skeletons of marine organisms like corals, mollusks, and foraminifera, all of which are composed of calcium carbonate.
* Burial and Compaction: As these organisms die, their shells and skeletons sink to the ocean floor and are buried under layers of sediment. Over time, the weight of the overlying sediment compresses the layers, squeezing out water and compacting the material.
* Cementation: Dissolved calcium carbonate in groundwater percolates through the sediment, acting as a cement that binds the particles together.
* Lithification: This process of compaction and cementation, known as lithification, transforms the loose sediment into solid rock, forming limestone.
So, while limestone can contain other minerals and fossils, its primary component is calcium carbonate.