What happens to particles in a substance when they are heated or cooled?

The bonds in between the particles become weakly bonded.