its all to do with vapour pressures equilibriums and intermolecular bonds.
if that was gobbledygook for youthen here is an explaination(umm sp? it looks wrong)
Water has what is called a 'non zero vapour pressure' even when its ice if its above a certain temperature. this means that a little bit will evapourate. this means that it will evapourate until the partial pressure(also known as pp. it is how much of the total pressure the particles of that particular substance are responsible for.) of itself in the atmosphere is the same as its vapour pressure and it will be in equilibrium. this doesn't happen in the atmosphere. its effectively an open system. if you do it in a lttle box then you will see the effect.
water, and all other substances, boil when their vapour pressure becomes greater than the local atmospheric pressure. if the pressure does not rise then it will all boil away, if it does then some may remain liquid.
the vapour pressure is dependant on the temperature(hotter the greater) and intermolecular bonds(bonds between molecules, stronger the smaller). this is why diferent substances boil at different temps.
Freezing is when the temperature falls low enough so that the intermolecular bonds can hold the molecules steady and they can't move.