Thermal energy is the total kinetic energy of the molecules in a substance, which includes both the kinetic energy of the individual molecules and the potential energy due to the interactions between the molecules. Temperature, on the other hand, is a measure of the average kinetic energy of the particles in a substance.
The relationship between thermal energy and temperature can be explained by the fact that thermal energy tends to flow from objects with higher temperatures to objects with lower temperatures until they reach thermal equilibrium. When two objects are in contact, the higher-temperature object transfers thermal energy to the lower-temperature object, causing its temperature to increase.
The amount of thermal energy required to change the temperature of a substance depends on its specific heat capacity, which is a measure of how much thermal energy is required to raise the temperature of one unit of mass of the substance by one degree Celsius. In general, substances with a higher specific heat capacity require more thermal energy to raise their temperature than substances with a lower specific heat capacity.
In summary, thermal energy impacts temperature by transferring energy between objects with different temperatures until they reach thermal equilibrium, and the amount of thermal energy required to change the temperature of a substance depends on its specific heat capacity.