When applying heat the solid will eventually reach its melting point. Its then that the solid will slowly start to turn into a liquid due to the heat transfer. The process will only continue with even more heat piling up causing it to evaporate and become a gas.
Heat transfer comes in different ways depending on the solid:
The heat energy breaks down the bonds between the molecules of the solid so the molecules become looser. Further hearing of the liquid causes the bonds to be broken down and the molecules will move further apart.