After sunset, heat begins to radiate away from the Earth and the layer of air in contact with the surface is cooled through conduction. When humidity is high enough, this lower layer of air will cool to its dew point temperature and fog will form. As sea temperatures stay fairly constant, radiation fog only occurs over the land.
The fine balance needed between these 3 factors means radiation fog is somewhat unpredictable.
When the air temperature is again raised above the dew point temperature, the fog will evaporate. This happens through: