Icicles are frozen water. They form at a time when the air temperature hovers around freezing, or when sunshine melts snow even while the air is below freezing.
The snow melts and water flows. If it drips off an overhanging surface, such as a roof, then it may well freeze again before it has dripped because the cold air will take the heat out of the water and turn it to ice.
Once an ice spike (icicle) has begun, then water flows down it. As the spike is frozen, it makes the flowing water more likely to freeze quickly, so the spike gets more ice added near the top, and it thickens.
Icicles can grow to many metres, and large ones sometimes break off under their own weight (as was the case with the icicle in this picture).