Heat differs from thermal energy in that heat is the transfer of thermal energy from one location, object or substance to another. Thus, heat is a process that happens to thermal energy and is meaningless without it. Thermal energy is the random kinetic energy of the constituent molecules or atoms of a substance and is transferred as heat via conduction, convection or radiation.
At any temperature above absolute zero, the constituent atoms or molecules of a substance are in constant, random motion. In solids, this movement is highly constrained and takes the form of molecular vibration. In fluids, particularly gases, the particles move in straight lines until they encounter another particle, bouncing off and transferring energy between them. This direct transfer is the type of heating known as conduction. Conduction also occurs with solids in contact with other substances, when the vibrating particles transfer energy from one to another.
Radiation also occurs in both solids and fluids. This type of heat is the conversion of kinetic thermal energy into electromagnetic energy. It then travels via photons to another object, where it is absorbed and converted back into thermal energy. Convection, on the other hand, only occurs in fluids, where a fluid with thermal energy travels as a current from one location to another, heating a new area via one of the other processes.