The particles are no longer held together by the attractive forces keeping it a liquid (hydrogen bonds in the case of water). Enough energy has to be put into the system to break these bonds. When this happens the particles pull apart and fill the space available as a gas