Far as i understand it, when talking about thermal energy we must also talk about the laws of thermodynamics which express the laws of the interaction of energy and matter.
First law of thermodynamics: Energy and matter are interchangable but cannot be created or destroyed. The total amount of energy in the whole universe remains constant, only changing from one form to another.
Second Law of thermodynamics: This law states that any system always tends to move toward its probable state of energy. For example, a spring watch will run until the potential energy in the spring is used up. If no new energy is input into it (in the form of winding the spring up) then it has returned to its most probable state, which is really not to run. The most misunderstood law.
Third Law of Thermodynamics: This law is a little more complicated and deals with the state of a system of atoms and molecules at an absolute zero temperature. Absolute zero is theoretically impossible to achieve considering any force acting upon the atoms and molecules to remove heat from them are not at absolute zero and therefore cannot make anything else reach absolute zero. The third law says that entropy of atoms and molecules at absolute zero is zero.