You heat up a liquid at its boiling point, and the temperature remains constant until all the liquid has turned into vapour. Since the temperature stays constant kinetic energy stays constant too, but why does the molecular potential energy increase?
The heat energy transferred to the substance undergoing a first order phase transition is used to break the molecular bonds of the substance characteristic of that phase. For example, when water ice changes to liquid water, one must provide the latent heat to break the bonds of the crystalline structure to the less tightly held together bonds of liquid water. Same story for liquid water to water vapor. You can see https://en.wikipedia.org/wiki/Latent_heat for more information.