Question: I am really confused in the terms **Temperature** and **Thermal Energy**. When I tried to look about it on internet, it mentioned that :  

Temperature is the measure of average kinetic energy while Thermal energy is the measure of total kinetic energy of the body.

I want the explanation for it, like how? If a cup is hot, then why does it depends on the average kinetic energy of the body and not the **total** energy of the body?

Answer: 
The Internet is an excellent source of information. However, it should be used with some caution. For Physics, it is usually better to start with a good textbook.

I do not know where you found the quoted definition. I have found an equal one [here](https://www.legendsoflearning.com/learning-objectives/temperature-thermal-energy-and-particle-motion/).

The first part (Temperature is the measure of average kinetic energy) is almost ok. However, it should be essential to add that the kinetic energy to be used is the one calculated in the center of mass (to avoid the well-known [flying ice-cube effect](https://en.wikipedia.org/wiki/Flying_ice_cube).

The second part (Thermal energy is the measure of total kinetic energy of the body) is more problematic. First of all, because *Thermal energy* is an [ill-defined concept](https://en.wikipedia.org/wiki/Thermal_energy) that can be referred to different concepts (total energy, kinetic energy). But also *total kinetic* energy sounds ambiguous. Did the author mean *total energy* or the kinetic energy of the whole system?

Statistical mechanics allows saying that the average kinetic energy *per particle* is proportional to the temperature. The internal energy is an extensive quantity, depending on temperature, but generally not linear with the temperature. Therefore, total energy cannot be used as a proxy for temperature and, in turn, cannot be used as a measure of hotness.
The term “thermal energy” is vague and should be avoided. Moreover, stating that thermal energy is the total kinetic energy of a body makes no sense. There is the kinetic energy of the body as a whole (e.g. the kinetic energy of a ball in flight) and the separate kinetic energy of the molecules of the ball, which is a part of its internal (microscopic) energy, and that temperature can be considered a measure of.

I recommend you think in terms of the following:

Internal Energy: The sum of the kinetic and potential energy at the molecular level due to molecular motions (kinetic energy) and intermolecular forces (molecular potential energy).

Mechanical Energy: Kinetic and potential energy (e.g. gravitational potential energy) of an object as a whole due to its motion and position with respect to an external (to the object) frame of reference.

Temperature: In kinetic theory, a measure of the average translational molecular kinetic energy (the translational molecular kinetic energy component of internal energy).

Heat: Energy transfer from one body to another due solely to a temperature difference between them.

Work: Energy transfer from one body to another due to force times displacement.

Hope this helps.