Tiny water droplets freezing in the air makes frost. When water changes to ice (or to steam, when heated) is a type of process known as a "phase transition." When water reaches freezing temperature, it will turn into ice. Different materials freeze at different temperatures, but water at sea level will freeze at 32 degrees Fahrenheit. Humidity measures how much vapor is present in the air at any given time. Clear, calm fall nights, when the air mass is especially humid, are the best conditions for frost to form.
Frost is the frozen version of dew, and, like snow, it results from the presence of too much water vapor in already-saturated air. It is a very thin deposit of tiny ice crystals. Frost forms when water vapor in the air condenses directly into ice, instead of condensing first into a liquid, then into ice. Condensation typically occurs when the temperature drops sufficiently for the air to become saturated with water vapor. The excess vapor condenses onto surfaces colder than the air. If the surface temperature is above 32 degrees Fahrenheit, dew will form; if it is below 32 degrees Fahrenheit, frost will form.
Frost forms on the inside surface of windowpanes when the air inside has lower humidity than the air outside. If it didn't, the water vapor would first condense into small drops before freezing into clear ice.