When a substance changes its state, the potential energy of the molecules increases, allowing them to overcome the intermolecular forces of attraction, and the kinetic energy remains the same, meaning that the temperature will remain the same, even though the substance is still being heated