what is the difference between thermal energy and heat?
Thermal energy refers to the energy contained within a system that is responsible for its temperature. Heat is the flow of thermal energy. A whole branch of physics, thermodynamics, deals with how heat is transferred between different systems and how work is done in the process (see the 1ˢᵗ law of thermodynamics).