Rainwater absorbs CO2 as it filters through soil, forming weak carbonic acid that dissolves limestone bedrock into calcium bicarbonate solution. When a drop finally emerges from a ceiling fracture into the open air of the cave, the pressure drop lets dissolved CO2 escape back into the cave atmosphere — a process called degassing.
Losing CO2 pushes the chemical equilibrium the other way: calcium bicarbonate converts back into solid calcium carbonate (calcite), which precipitates out right where the drop clings to the ceiling. A faster degassing rate deposits more mineral at the ceiling tip itself, growing a thin, fast stalactite "soda straw". A higher drip rate delivers more total dissolved mineral per unit time, but each individual drop lingers for less time before falling, so less of its load precipitates before it drips away.
The fraction that does not precipitate on the ceiling falls with the drop and splashes on the cave floor below, where impact agitation and further degassing releases most of the remaining CO2 at once — building a broader, slower-growing stalagmite directly beneath. Given enough millennia, the two can meet and fuse into a single floor-to-ceiling column, exactly as in real limestone caves like Carlsbad Caverns or Mammoth Cave.