Matter is made of tiny particles called atoms. Atoms are always moving. The energy of moving atoms is called thermal energy.
The total amount of thermal energy in matter depends on three things: the type of matter, the amount of matter, and how fast the atoms are moving.
Temperature measures how hot or cold matter is. If the atoms in matter slow down, the temperature goes down. The matter now has both less thermal energy and a lower temperature.
A change in an object's temperature indicates a change in the object's thermal energy:
An increase in temperature shows that the object's thermal energy increased. So, thermal energy was transferred into the object from its surroundings.
A decrease in temperature shows that the object's thermal energy decreased. So, thermal energy was transferred out of the object to its surroundings.