The particles that make up an object can have ordered energy and disordered energy. The kinetic energy of an object due to its motion with velocity v with respect to an observer is an example of ordered energy. The kinetic energy of individual atoms, when they are randomly vibrating about their equilibrium position, is an example of disordered energy.
Thermal energy is disordered energy.
The temperature is a measure of this internal, disordered energy. The absolute temperature of any substance is proportional to the average kinetic energy associated with the random motion of the substance. In a gas the individual atoms and molecules are moving randomly. The average kinetic energy of the molecules in a gas is proportional to the absolute temperature T of the gas. In a solid, the atoms can move randomly about their equilibrium positions.