Final answer:
Groundwater containing CO₂ forms a weak acid that dissolves limestone (CaCO₃), gradually forming caverns. Solubility equilibria and long periods of water evaporation inside caves result in formations like stalactites and stalagmites. This same process can also create sinkholes above ground.
Step-by-step explanation:
Groundwater creates caverns through a process involving acidic groundwater dissolving and carrying away the limestone. When groundwater containing atmospheric CO₂ gets into cracks in limestone, it forms a weak acid that can dissolve calcium carbonate (CaCO₃), which is the primary component of limestone. Over thousands of years, this process enlarges the cracks and eventually creates caverns.
The formations of stalactites and stalagmites in caves are also related to this process. As water rich in dissolved CaCO₃ seeps into the cave and evaporates, the mineral deposits build up to form these structures, enhancing the cave's complexity and beauty. Limestone deposits often consist of the remains of marine creatures, and apart from cave formation, the similar solubility equilibria can cause above-ground effects such as sinkholes.