A pure substance is made of similar particles. The particles of a substance when it a solid have a smaller amount of energy and this allows them to stay in a ordered structure. When the substance is heated, energy is absorbed by the particles and they begin to vibrate faster. The extent of vibration increases with temperature. At a particular temperature called the melting point, the particles have absorbed so a lot of energy and are vibrating so much that the attractive forces that kept them in an ordered structure when in the solid state can no longer do that. The substance melts and turns to liquid.
The particles of a substance when it is solid, liquid or gas remain the same. Their atomic or molecular configuration does not change. Only the amount of energy in each of the particles increases as it melts. The particles are no longer restricted in a fixed physical structure and can move relative to other particles forming the substance.