When a substance is under less pressure, or is under higher heat, it is gaining energy still. The particles vibrate faster, and get slightly more spaced out. If you take a metal ball and ring that fits perfectly around the ball, then heat the ball up with a flame, you will notice that the ball doesn't fit through the ring. The ball is still solid, but because it had more heat, it had more energy.