An object moving twice as fast has four times as much energy. Any material consists of atoms and molecules that are in continual, random motion. In a gas, the molecules move freely, interacting with each other briefly during collisions. In solids the molecules are locked in a lattice, and vibrate about a relatively fixed position. As the temperature is increased, the motions increase.
Temperature is actually a measure of the amount of energy possessed by each molecule.
The heat engines built by engineers such as James Watt in the 18th century are devices that extract some of the thermal energy and convert it to other, more practical, forms of energy. The science of thermodynamics was driven by a desire to build more efficient heat engines. Four laws of thermodynamics have been identified. The energy of a system may be changed by adding heat to it or doing work on it. Equivalently, a system may do work at the expense of its internal, thermal, energy.