When a pure solid is heated, its temperature rises until it starts to melt. At its melting point, any additional heat supplied will not change its temperature. When the pure solid becomes a pure liquid (a change in state), further heating will again raise the temperature of the liquid until it starts to boil.
At its boiling point, any additional heat supplied causes boiling without any temperature rise. When the pure liquid becomes a pure gas (a change in state), further heating will again raise the temperature of the gas.
Therefore, at particular temperatures, heating changes the state of the substance. Melting and boiling are such processes. Similarly, at almost the same particular temperatures for the same substance, cooling can also change its states. Condensing and freezing are such processes.
The properties of the molecules of the substances vary with the amount of thermal energy they possess.
Important: During the changing of state, the temperature of the gas/liquid/solid is constant.