Dear student,
The measure of the thermal energy is the measure of the internal energy of the substance. It is possessed by the increase or decrease of the temperature.
If the thermal energy of the substance is enough to reach the boiling point of the substance, the substance exists in the gaseous state.
Regards