As rain falls and snow melts, water slowly seeps into the ground and combines with carbon dioxide (CO2) and becomes carbonic acid, which is a weak acid capable of dissolving rock over time. Carbonic acid may sound scary, but it is in fact the main ingredient in all carbonated drinks like soda pop and sparkling water.
Eventually, this weak acid slips into the crack in the rock and gets stuck. While sitting for long periods, it slowly eats away at the stone and creates a larger opening. By opening up these pockets of air in the rock, the acid creates room for cave formations, or speleothems, to build up.