What has to happen to get water vapor in the atmosphere to condense?
It has to reach 100% relative humidity, or close to.
The amount of water vapor that the air can hold is based on the temperature of the air. The warmer the air the more water vapor it can hold.
So if you had an air temperature of 20 C that air could hold about 15 grams of water per kilogram of air. So the first way to get water vapor is have 15 g/kg of water in that air. Since that is the maximum amount of water it can hold any other water will condense.
The most common way however is through cooling. If you have an air parcel at 20 C with 10 g/kg of water in it, when that air cools to about 14 degrees, 10 g/kg is the maximum amount of water vapor it can hold so condensation occurs.
Now in order for this to occur naturally, the water needs something to condense on. This can be dust, salt or even ice particles which we refer to as condensation nuclei. The existence of condensation nuclei is very important, since natural spontaneous condensation actually would require a relative humidity of around 300%.