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
Gas
When a gas is heated, the particles gain kinetic energy and move faster.
If the gas is trapped within a container that cannot expand, it means that the volume of the gas is fixed, and so the pressure inside the container increases