The thermal energy of a substance is related to the movement of the particles in the substance. This energy is defined by the temperature of the substance and whether heat is transferred or lost. This can be explained as a higher temperature causes the particles in substances to move faster and collide.