Experimentally heat is absorbed to melt a solid or to vaporise a liquid and as the temperature remains constant at the melting or boiling temperature, the entropy must be increasing. If the entropy change from one phase to the other is $\Delta S_{1,2} = S_2 - S_1 $ and the heat absorbed (i.e. enthalpy or latent* heat) is positive $\Delta H_{1,2}$ in transforming phase 1 to phase 2, the entropy change is positive, $\Delta S_{1,2} = \Delta H_{1,2}/T$.
Any solid or liquid is held together by intermolecular potential energy, in general called van-der-Waals potentials (ion-dipole, dipole - dipole etc). Starting from a temperature just below the melting point as energy is added the molecules absorb this both as kinetic and potential energy (vibration and rotation quantum numbers increase) both internally (normal mode vibrations & rotations) and also as motion in the intermolecular potential. The potential interaction between molecules is unchanged as heat is added, but the molecules start to gain enough energy to overcome the well formed by the potential and that holds them in place.
There is now an increase in entropy as there are more energy levels that the molecules can occupy and so more ways of occupying them, i.e the number of possible configurations $\Omega$ (or complexions) increases. Entropy is proportional to the number of these as $S=k_B\ln(\Omega)$.
Another form of the increase in entropy is that of position, which is strictly fixed in a solid, but exchange of a molecule’s position occurs all the time in a liquid. Positional exchange largely accounts for the entropy increase in atomic solid-liquid transitions, $\approx 8~ \pu{J K^{-1}mol^{-1}}$ e.g. solid - liquid argon.
Eventually there is enough energy that molecules start to escape from the intermolecular potential and so the phase changes.
Generally the process of initiating a phase change, say, freezing relies on nucleation, then growth of the nucleus. If this does not occur supercooling or superheating is observed. In supercooling, which is common, water for example, can still be liquid many degrees below normal freezing point. Part of the effect of overcoming the intermolecular potential is to form a nucleation/seed site, say a small region of vapour inside a liquid or a region of crystal inside a liquid. Next this region will either grow and form some bigger region or shrink to nothing in size.
The nucleus/seed will not grow spontaneously due to the relatively large surface energy which is relatively larger when a nuclei is small, however, a fluctuation in the structure due to some random accumulation of thermal energy may increase its size and so it now becomes stable. The competition is between the negative free energy gain from the volume of the new phase 2 being lower than that of phase 1, and the loss in free energy due to the positive surface energy. As the radius of the nucleus/seed increases the volume term wins out and growth is now spontaneous.
Finally, the average translational kinetic energy of a molecule is $3k_BT/2$ irrespective of whether the molecule is in the gas, liquid or solid phase. In the liquid or the solid the motion is merely restricted to a narrower range around the minimum of the intermolecular potential, than it is in the gas phase. Thus the notion that it is the kinetic energy that molecules acquire is the reason for molecules to go into the vapour phase is incorrect.
- The term ‘latent heat’ of vaporisation or fusion is rarely used nowadays and instead enthalpy of vaporisation or fusion are used. ‘Fusion’ is an old -fashioned word for melting.