Fog forms when warmer air interacts with cold air or vice versa. Cold air can hold less water vapor than the warm air, so the water vapor condenses into liquid water to form fog. When ambient air temperatures drop to the dew point, the water vapor condenses into fog too. Fog is simply clouds at ground-level.
Dense Fog Advisories are up for portions of the New Jersey and New York coast and adjacent coastal towns. Air quality alerts are also up for portions of New Mexico, where smoke from nearby fires will reduce visibility much like fog does. In these areas, the National Weather Service cautions that visibilities will be less than one-quarter of a mile and people should drive with caution here tonight.