Thermal energy gives the particles of the substance kinetic energy because temperature is an average measure of kinetic enegy of the particle. If we give them thermal energy the particle will move faster, gaining enough energy to escape and become free. For example, from solid to liquid, the particles would espace their fixed position and be free to move as a liquid.