They are formed through a process called speleothem formation, where water containing dissolved calcium carbonate drips from the ceiling of a cave. As the water evaporates, the calcium carbonate precipitates out and builds up over time, forming the characteristic icicle-like structures.