Air absorbs moisture like a sponge. The warmer the air, the more moisture it can hold, hence some hot days being very humid, and cold days feeling dry.
Think of when you take something out of the fridge and stand it on the kitchen work surface. It gets wet on the outside. This is because the air touching it is cooled, so cannot hold as much moisture, so it deposits it onto the cold surface. Same thing happens when the air hits the cold windows inside your car, (or your house if you don't put the heating on).
As the air enters the car through the aircon unit, it is cooled. A lot of moisture is deposited in the cooling unit, so the air entering the car is drier. As the droplets in the cooling unit increase, they join together and when big enough, drain out the bottom. On hot days, aircon cars will often leave puddles of clean water.
When you turn the aircon off, the cooling unit quickly warms to ambient temperature. The air entering the car will collect any moisture that has not drained out, so increasing the moisture content entering the car, hence the rapid misting up of windows.
If the aircon is used on damp days, it needs to be left on to maintain the drier atmosphere inside.
Because the air entering the car is drier, the driver especially should ensure they have plenty to drink, as they will lose water more rapidly and may dehydrate on longer journeys. Wearing some contact lenses can also be a problem if the drier air dries the eyes and the lenses start to shrink. Wear glasses.