Frost can be formed in two ways. On a colder object by water directly desublimating on its surface or on any object when air is saturated with water.
Frost can form on a moving airplane, but only the second way. Why would they have anti-ice on pitot tubes, propeller and leading edges otherwise?
When the air is not saturated with water, ice will sublimate. If the air is moving it carries away the sublimated vapour and thus increases the sublimation rate. When flying in visual meteorological conditions, that's generally the case, so frost won't form in VMC, thogh watch out when dew point is close to temperature; in such case light haze may form that already causes some icing while visibility is still above the VMC limit. Ram and friction heating also help sublimating the ice a bit.
However when you fly into a cloud in freezing temperature, the water droplets will freeze on the aircraft when they hit it. They will hit it on forward-facing surfaces: wing and stabilizer leading edges, propellers, engine inlets, pitot tubes and nose and windscreen. That's why these components have anti-ice, either using heating or deicing boots.
VMC-only aircraft will often only have pitot tube heating and carburettor heating, because those can sometimes gather frost in sufficiently moist air that is not yet forming cloud. This lack of anti-ice makes flying into IMC even more dangerous in winter than it already is for all the other reasons.
Icing only happens when the cloud contains supercooled water droplets, which occurs in clouds where the ambient air temperature is between freezing point (0°C/32°F) and around -40°C/-40°F when the droplets freeze to ice pellets. The exact point the droplets freeze varies somewhat because it depends on other parameters like amount of dust, but pilots can check whether they are accreting any ice by looking in the corners of the windscreen. Whether freezing conditions are to be expected will also be mentioned in the detailed weather forecast.