The air usually always contains some water vapor.
Water has three phases: liquid water, solid ice and water vapor. Under the 32-degrees water is usually in form of ice and in temperatures over 212 it turns into steam. Usually a window has warmer air on the indoors -side than on the outside. The outside air is making the window slightly cooler than the air inside. Therefore the water vapor in air is cooled down when it makes contact with the glass. When it cools, it turns back to liquid water and that forms the droplets you can sometimes see on steamy window.
The same phenomenon you can see in metallic cold water pipes. Pipes, “sweat”, because they are so cold that water vapor in the air will condense into water.
Also, human exhaled air is warm and humid. Therefore on cold weather breath turns into steam. You can also try to breath towards window or a mirror – it should generate some steam on it.