In science heat and temperature are related to each other. Heat is the total energy of molecular motion in a substance while temperature is a measure of the average energy of molecular motion in a substance. So, thermal energy comes from a substance whose molecules and atoms are vibrating faster due due to a rise in temperature.
hope it helps
describe the relationship among temperature heat and thermal energy