Because it is so difficult to observe what happens to materials in a hot kiln, this isn't fully understood. Also, the materials scientists quickly go into complex mathematical formula, which won't be of much help to potters. But the following will hopefully make things clear.
If we have a lump of a pure that is stable enough that no chemical reactions occur in the melting process, then here is what happens:
We supply heat energy to our solid, and this causes the temperature to rise. At an atomic level the atoms are vibrating around with increasing energy as the temperature rises, so bouncing around further and further from their average position, which strains the bonds between the atoms that keep things as a solid.
As the temperature rises, some of these bonds between atoms start breaking due to getting stretched too much, and the solid starts melting. The atoms have more energy than the bonds between them as a solid, and so are free to move. To break the bonds requires more energy, so for a while although we continue to heat the solid, the temperature doesn't increase, as the energy is being used to break the binds between atoms - this is called the latent heat, or enthalpy of fusion.
In thermodynamics there is the concept of Gibbs Free Energy (or Gibbs Energy), 𝛥G. At the melting point, the change in 𝛥G in going between solid and liquid (or vice versa) is zero, because in melting the entropy increases, as the mobile atoms are less ordered than when in the solid state. This means that it is equally comfortable being a solid or liquid - change the temperature and it will melt or solidify.
The same process happens for molecules, though there is the added complication that the solid may be in the form of a metal, or crystalline (like silica), or molecular. Also, the molecular structure may also break down into smaller compounds if the heat energy is enough to make its internal bonds get stressed too much.