Lets look at this problem in terms of an equilibrium. It is important to realize that on the molecular level, most things can be described as an overall average of the same molecule in different states. Here we are talking about two different states being liquid or gas phase molecules. So, remembering our physics classes, we know that for a balanced system, any pressure acting on a surface must be balanced by an equal and opposite pressure from that surface. So, as the gas (air) above a liquid surface exerts pressure on the liquid surface, the liquid surface pushes back with an equal pressure. Part of the pressure that the liquid exerts on the air is generated by molecules of the liquid "trying" to become molecules of gas. The thermal energy of the liquid molecules will tend to push them apart due to the molecular motion it causes. As you add heat (thermal energy) to the liquid, the motion of the molecules increases, and the pressure they exert on the air above them also increases. This is called the vapor pressure of a liquid. So, what happens when the vapor pressure of a liquid is less than the pressure of the gas above it? Conversely, what happens when the vapor pressure of the liquid is greater than the gas above it? By either changing the vapor pressure of the liquid (changing its temperature), or changing the gas pressure above the liquid, we can control the equilibrium of the liquid and gas. As for predicting these phase change phenomena, a good table of liquid vapor pressures should help.