Thermal energy is created from the motion of atoms and molecules within an object. Because thermal energy is created by the movement of particles, it is considered a form of kinetic energy.
Thermal energy is related to temperature and heat, but it is not the same thing. Thermal energy refers only to the energy contained within an object due to the movement of its particles. Since particles are always in motion, all objects, whether they are hot or cold in temperature, have some measure of thermal energy. Heat energy refers to the energy transferred between two objects due to a temperature difference between them.
As the speed of an object's particles increases as the object increases in temperature, the transfer of heat energy to an object also results in an increase in its thermal energy. This does not necessarily mean that a hotter object contains more thermal energy than a cooler object. Because larger objects have a larger number of particles, they always contain more thermal energy than smaller objects of the same temperature. Consequently, it is possible for a block of ice of sufficient mass to contain more thermal energy than a much smaller object that is on fire.