Hail is formed due to what is known as "supercool" water in cumulonimbus clouds. Of course, the process is a little bit more complicated that that.

The exact process of hail formation, as explained by the experts at the University Corporation for Atmospheric Research:
Now you are aware of the complicated process from which hail begins its life.