Limestone is a common type of carbonate sedimentary rock. It is composed mostly of the minerals calcite and aragonite, which are different crystal forms of calcium carbonate (CaCO3). Limestone forms when these minerals precipitate out of water containing dissolved calcium. This can take place through both biological and nonbiological processes, though biological processes have likely been more important for the last 540 million years. Limestone often contains fossils, and these provide scientists with information on ancient environments and on the evolution of life.

Magnesian limestone is an obsolete and poorly-defined term used variously for dolomite, for limestone containing significant dolomite (dolomitic limestone), or for any other limestone containing a significant percentage of magnesium. Most limestone was formed in shallow marine environments, such as continental shelves or platforms, though smaller amounts were formed in many other environments. Much dolomite is secondary dolomite, formed by chemical alteration of limestone.

Limestone is exposed over large regions of the Earth's surface, and because limestone is slightly soluble in rainwater, these exposures often are eroded to become karst landscapes. Most cave systems are found in limestone bedrock.

More Info: en.wikipedia.org