I was woken by fog horns from Southampton Water this morning. Visibility at 6am BST was approximately 600m (fog is anything less than 1km) and was higher even by 7am.
Fog forms when the air cannot hold any more water vapour. It is saturated (the air temperature reaches the dew point or relative humidity reaches 100%). Invisible water vapour condenses on microscopic particles to form tiny droplets which form the fog and on surfaces to make dew.
Fog and mist are a feature of autumn. The air is still warm enough to contain lots of water vapour (the air is humid because warm air can hold more water vapour than cool) but nights are longer and so the air can cool by dawn to the dew point, where vapour condenses.