When two substances with different temperatures come into contact, thermal energy is transferred from the warmer substance to the cooler substance. Therefore, the correct response is:
Thermal energy is transferred from the warmer substance to the cooler substance.