When this water that now holds the dissolved rock is exposed to the air in the cave, it releases the carbon dioxide gas, much like when a bottle of soda is opened. As the redeposited minerals build up after countless water drops, a stalactite is formed. If the water that drops to the floor of the cave still has some dissolved calcite in it, it can deposit more dissolved calcite there, forming a stalagmite. Speleothems form at varying rates as calcite crystals build up. Several factors can determine the rate of growth.
Most scientists believe that the color of speleothems are determined by the mineral content.
Pure calcite is white and almost colorless. Iron and other minerals, as well as acids from surface vegetation, combine with calcite crystals to add shades of red, orange and black to the color of speleothems. Others believe that humic and fulvic acids in the soil may also contribute to speleothem coloration.