The hot water dissolves different minerals, then as the water comes to the surface and cools, the solution precipitates back out into solids, and builds different shapes. (see? I was paying attention in Chemistry class)