It has to be very cold, for a long time. Most people know moving water can’t freeze, but in real life scenarios, there’s always a spot where water comes in contact with a solid surface (rocks, ice) that momentarily brings the fluid to a stop, in that short amount of time it has to be cold enough to freeze the water, this spot is called a nucleation spot (where things start). From there it just basically builds outwards, rock to ice and more ice until the whole thing is frozen, the water freezing like a column as it flows down and hits ice below, layer by layer.
Edit: Source: [https://www.reddit.com/r/explainlikeimfive/comments/5mr754/eli5how_do_waterfalls_freeze/](https://www.reddit.com/r/explainlikeimfive/comments/5mr754/eli5how_do_waterfalls_freeze/)
Latest Answers