Everything I know about galvanizing I learned from FredT. I think I have this all right, but please correct me if I'm wrong... and I haven't had my morning Dew yet, so it probably won't be overly coherent.
Galvanizing works because the zinc layer on the outside is a sacrificial anode. It also works because of electrical potential. When there's a scratch in the surface of the protective zinc coating, the zinc is absorbed into the surrounding water and then deposited on the surface of the scratch, recreating the protective coating over these scratches. I think it has something to do with being suberged in a conductive liquid, and the difference in potential induces a current, and the current causes the zinc to be plated to the exposed steel. Or something. But anyway.
This is all well and good for all tanks, until you realize that painting a tank ruins the galvanic action. The "protection" as it were depends on the large surface area of exposed zinc compared to the small surface area of exposed steel. Thus, scratches on tanks that have been galvanized and then painted rust whereas scratches on tanks that are only galvanized do not.
As for hot vs cold, hot-dipping is literally dipping the steel into a vat of molten zinc, as Rick mentioned. This yields a thicker, more durable, and more consistent coverage than does cold spray or painting or whatever it is that they do.