The water is present in the air as moisture or humidity. On contact with a significantly colder surface, the vapour condensates into its liquid form on that surface.
Thus, if the inside surfaces of your car windows are fogged, it is particularly because of the internal car air losing its moisture on the glass surface.
Alternatively, when the temperature outside is considerably higher than internal temperatures, the outside air releases its moisture on the glass surface.