In solids, strong attractive forces hold the particles in place, so that they can only vibrate in position.
As the substance is heated, the particles gain energy and vibrate faster and faster. Eventually, the particles have so much energy that they can overcome the forces holding them together, and the substance melts into a liquid.