Thermal energy, also called internal energy, is the total kinetic energy of all the particles in a system due to their motion and vibrations. It arises from the microscopic behavior and motions of atoms and molecules. Thermal energy can change forms within a system, flowing in and out as heat when there is a temperature difference. Heat and work are both ways to transfer energy but heat is specifically the transfer due to a temperature change, not mechanical work. The calorie, often used to measure food energy and heat, is actually a unit of energy equal to 4.186 joules.