Thermal energy is the total kinetic and potential energy of the particles in a substance. Kinetic energy is the energy of motion, and potential energy is the energy of position. The particles in an object are constantly moving, so they have kinetic energy. They also attract and repel each other, which gives them potential energy. Thermal energy is a measure of the average kinetic and potential energy of the particles in a substance.