In solids, the intermolecular forces are very strong, and the constitute particles are closely packed. Only heating, the kinetic energy of the particles increases. At a stage, it becomes sufficient to overcome the blinding forces in the solids. At this stage, a solid start melting and solid gets converted into liquid. On further heating, the particles in the liquid gain more kinetic energy.

At a stage the kinetic energy of particles become so large that the particles are able to free themselves, and the liquid starts changing into vapors (the gaseous state). In gases, the particles are far away from each other, and the particles do not exert any attractive\repulsive forces on each other.