Fog primarily forms when it is warm during the day but becomes very cold at night. That is why most fog occurs in the fall, but it can also occur in winter under the right temperature conditions.