It's quite simple .. when water is cooled, ice formation starts from outward to inward, meaning ice formation starts from the surface of water and goes inward. If there is any hole present in the outermost layer, the water is pushed out. As the water is pushed out , it freezes immediately and forms a spike.
Thanks for stopping by :)