Like most other sedimentary rocks, most limestone is composed of grains. Most grains in limestone are skeletal fragments of marine organisms such as coral or foraminifera. Other carbonate grains comprising limestones are ooids, peloids, intraclasts, and extraclasts. These organisms secrete shells made of aragonite or calcite, and leave these shells behind when they die.
Limestone often contains variable amounts of silica in the form of chert (chalcedony, flint, jasper, etc.) or siliceous skeletal fragment (sponge spicules, diatoms, radiolarians), and varying amounts of clay, silt and sand (terrestrial detritus) carried in by rivers.
Some limestones do not consist of grains at all, and are formed completely by the chemical precipitation of calcite or aragonite, i.e. travertine. Secondary calcite may be deposited by supersaturated meteoric waters (groundwater that precipitates the material in caves). This produces speleothems, such as stalagmites and stalactites. Another form taken by calcite is oolitic limestone, which can be recognized by its granular (oolite) appearance.
The primary source of the calcite in limestone is most commonly marine organisms. Some of these organisms can construct mounds of rock known as reefs, building upon past generations. Below about 3,000 meters, water pressure and temperature conditions cause the dissolution of calcite to increase nonlinearly, so limestone typically does not form in deeper waters (see lysocline). Limestones may also form in lacustrine and evaporite depositional environments.
Calcite can be dissolved or precipitated by groundwater, depending on several factors, including the water temperature, pH, and dissolved ion concentrations. Calcite exhibits an unusual characteristic called retrograde solubility, in which it becomes less soluble in water as the temperature increases.
Impurities (such as clay, sand, organic remains, iron oxide, and other materials) will cause limestones to exhibit different colors, especially with weathered surfaces.
Limestone may be crystalline, clastic, granular, or massive, depending on the method of formation. Crystals of calcite, quartz, dolomite or barite may line small cavities in the rock. When conditions are right for precipitation, calcite forms mineral coatings that cement the existing rock grains together, or it can fill fractures.
Travertine is a banded, compact variety of limestone formed along streams; particularly where there are waterfalls and around hot or cold springs. Calcium carbonate is deposited where evaporation of the water leaves a solution supersaturated with the chemical constituents of calcite. Tufa, a porous or cellular variety of travertine, is found near waterfalls. Coquina is a poorly consolidated limestone composed of pieces of coral or shells.
During regional metamorphism that occurs during the mountain building process (orogeny), limestone recrystallizes into marble.
Limestone is a parent material of Mollisol soil group.