What is thermal energy?
Any physical system, being it "hard matter" (e.g. stones) or "soft" matter (e.g. human tissues) "possesses" energy.
In order to understand better and make better of them, scientists all over the last centuries "slowly" defined and classified them.
Potential energy is the energy of a body associated to potential field, e.g. gravity or electrical, they are conservative and can be transformed into other forms, e.g. water falling off to create electricity. Another time of energy is chemical, the one we used to live, from food, other is electrical, the one we use for instance to feed our appliances.
Thermal energy is the internal energy of a body associated to temperature, heat. It has been a mystery for centuries, mainly because the corpuscular theory of heat was just proposed and developed in the 19th century, Einstein used it to support his studies in the Brownian motion. One constant associated to thermal energy is specific heat. Nowadays we now thermal energy is stored in several degrees of freedom, e.g. for a mono-atomic matter, we had three for each axis and possibly rotation.
Thermal energy is the total (net) kinetic energy of the constituents (i.e. molecules and atoms) of a body
According to the corpuscular theory of heat, the temperature of a body is the result of vibration of their molecules.
It means that thermal energy can be stored in different rates and amounts depending on the body composition. Some degrees of freedom for storing thermal energy are single vibration, three D, coupled vibration, two molecules like a planet and a moon, Pluto and its big moon.
The measure of thermal energy stored in a body is called heat capacity. The models for heat capacity are, in chronological order: 1) Dulong-Petit Law (1819); b) Einstein model; c) Debye model. They differ in details and range of applicability.