Sediments
Limestone is created in different environments, but no matter where it is formed, it is made up of tiny sediments that have been pressed together. Limestone is composed primarily of a mineral called calcite, which is one of Earth's most common minerals, and which contributes to the formation of many different types of rock. Calcite is produced mainly by marine organisms, some of which also contribute bits of shell and fecal debris that may also make up limestone rock.
Pressure
The sediments that make up limestone are layered over time. After many years, the layers on the bottom are placed under so much pressure that they are pushed together to form rock. Though the limestone may spend hundreds of years underground, and may be buried forever, much of it has been exposed by erosion due to water and weather, the shifting of the Earth's plates and human activity, such as digging for roadways and blasting for mining.
Evaporation
Limestone is sometimes created through the process of water evaporation. Formations inside caves, such as stalactites and stalagmites, are the result of water dripping from the cave ceiling. When the water evaporates, it leaves behind any sediments it carried, including calcite, the mineral primarily responsible for the formation of limestone. After several hundred years, the sediments continue to build until they create a limestone rock formation.
Marine Life
The calm waters many marine animals call home contain calcite, which the animals can extract and use to create shells. When the animals die, their shells and skeletons are eroded over time, and contribute sediments to limestone rock. Living creatures in the water contribute fecal sediments, which also become a part of this biological limestone. There are numerous limestone-creating marine areas today, and these areas shift constantly over tens of thousands of years or longer. Many regions that are now forests and mountains were once covered in water. The limestone formations there hold the fossils of the marine creatures that helped to create them.