When water vapour is formed in the air, part of it is blown away by the wind. Mountains become a barrier to wind, making the water vapour rise up even higher. As the temperature drops due to the high altitude on top of the mountain, the water vapour condenses (cools) forming clouds. That is why mountain peaks are often seen with layers of cloud.