Fog is a cloud based on the ground, rather than in the atmosphere.
Fog forms when there is a lot of moisture near the ground, or when the air near the ground cools to the dew point. The temperature to which air must be cooled in order for the water vapor in the air to condense into liquid water is known as the dew point. If air near the ground cools to this temperature, water vapor from the air will become visible as dew on the ground or fog in the air.