Thermal energy refers to several distinct thermodynamic quantities, such as the internal energy of a system; heat or sensible heat, which are defined as types of energy transfer (as is work); or for the characteristic energy of a degree of freedom in a thermal system , where is temperature and is the Boltzmann constant.
Heat is energy transferred spontaneously from a hotter to a colder system or body. Heat is energy in transfer, not a property of any one system, or 'contained' within it. On the other hand, internal energy is a property of a system. In an ideal gas, the internal energy is the sum total of the gas particles' kinetic energy, and it is this kinetic motion that is the source and the effect of the transfer of heat across a system's boundary. For this reason, the term "thermal energy" is sometimes used synonymously with internal energy. (Heat and work depend on the way in which an energy transfer occurred, whereas internal energy is a property of the state of a system and can thus be understood even without knowing how the energy got there.) The term "thermal energy" is also applied to the energy carried by a heat flow, although this quantity can also simply be called heat or amount of heat.
In an 1847 lecture titled "On Matter, Living Force, and Heat", James Prescott Joule characterised various terms that are closely related to thermal energy and heat. He identified the terms latent heat and sensible heat as forms of heat each affecting distinct physical phenomena, namely the potential and kinetic energy of particles, respectively. He described latent energy as the energy of interaction in a given configuration of particles, i.e. a form of potential energy, and the sensible heat as an energy affecting temperature measured by the thermometer due to the thermal energy, which he called the living force.
If the minimum temperature of a system's environment is and the system's entropy is , then a part of the system's internal energy amounting to cannot be converted into useful work. This is the difference between the internal energy and the Helmholtz free energy.
We define the thermal current density to be a vector parallel to the direction of heat flow, whose magnitude gives the thermal energy per unit time crossing a unit area perpendicular to the flow.
I am inclined to believe that both of these hypotheses will be found to hold good,--that in some instances, particularly in the case of sensible heat, or such as is indicated by the thermometer, heat will be found to consist in the living force of the particles of the bodies in which it is induced; whilst in others, particularly in the case of latent heat, the phenomena are produced by the separation of particle from particle, so as to cause them to attract one another through a greater space.