Here's why:
* Limestone is a sedimentary rock primarily composed of calcium carbonate.
* Caves form in limestone because the rock is easily dissolved by acidic water.
* Stalactites and stalagmites are formed by the slow precipitation of calcium carbonate from dripping water. The water, often slightly acidic from dissolved carbon dioxide, dissolves limestone as it flows through the cave. As the water drips, it loses carbon dioxide and the calcium carbonate precipitates out, forming the familiar formations.