When kinetic energy is increasing molecules are simply moving faster. However, when the potential energy is increasing molecules are changing phases. Therefore, when the potential energy is increasing is when the molecule is changing phases
Energy is required to change the phase of a material, with the change in energy either it decreases or increases. When the phase is changed, the temperature and kinetic energy does not change it stays the same but the internal energy changes