In fact, when you do this, the water will boil and freeze at
the same time.
The reason is that at room temperature, water molecules are constantly
going into the air as vapor and moving back into the liquid water. When
you heat water, you are making the vapor that comes off the water have a
higher pressure. When the pressure gets as high as the pressure of the
surrounding air, bubbles of vapor can form inside the liquid and push
against the air. When this happens, the liquid boils. If you remove the
air and water vapor in a vacuum chamber, water vapor can't go back into the
liquid. In fact, the vapor going off from the liquid will have enough
pressure to actually make bubbles in the liquid.
That's why water will boil in a vacuum chamber. I also told you it will
freeze at the same time. Why is this? It turns out that water molecules
like to be next to each other in the liquid. It takes energy to move them
into the vapor. When water molecules are moving back and forth between the
liquid and vapor, the energy that is taken from the liquid to put molecules
into the vapor is replaced by the energy returned when molecules move from
the vapor into the liquid. In the vacuum chamber, though, the vapor is
taken away, so none of the energy is returned to the water. As the water
loses energy, it gets colder and finally freezes.