Inside a storm cloud, raindrops may be carried up by air currents. They freeze up high inside the cloud. An opaque layer of ice builds up as water vapor freezes on it. They fall to much warmer levels, where the outside melts. It is then refrozen into a clear layer of ice. The hailstone goes back up again. The hailstone rises and falls, until it finally falls to the ground.
Hope this helps you!