Most limestone deposits result from millions of years ago from the shells and skeletons of living marine organisms ...

Limestone sludge formed at the bottom of the sea, coral sticks grew and were superimposed. The sludge solidified. It partially reacted with magnesium in water and formed this way dolomite which is closely related to the limestone.
With the compaction of younger sediments, the underground became more and more solid to end up over millions of years as solid rock. Under special conditions fossils appeared, such as the approximately 170 million years old Ammonite from the Jurassic.
Today's limestone deposits are up to 600 million years old and can be classified according to their period of formation: