Fact 1: fog is formed by water vapor condensing in the air. 
Fact 2: Fog is essentially very low clouds, consisting of water vapor cooling and beginning to condense.
When water vapors cool down, fog is formed in the air.