Car windows fog up due to condensation, the process through which water vapor becomes liquid water. Condensation is the result of changes in temperature or uneven temperatures between surfaces.
The air is always full of gaseous water, or water vapor. This water remains in its gaseous state until it reaches the dewpoint; the dewpoint is the point at which the air becomes saturated with water and begins to condense. This is the same process that causes dew to form on grass on cool mornings.
Condensation on car windows happens when warm, moist air meets cooler, dryer air. This occurs most frequently in spring and autumn months when there is a greater difference between daytime and evening temperatures. The interior of a car traps and holds heat well into the night, while the outside air temperature cools. Window glass provides a thick surface between those different temperatures, and condensation forms. Condensation can form on house windows as well, but home windows tend to be insulated, making them more resistant to condensation. Car windows might also fog on a cold day. Warm bodies and moist air from breath, in addition to the car's heat system, cause a similar effect to morning temperature differences.