Thermal energy is energy that is generated from heat.
Electricity is generated from turbos that are driven by steam. The steam is made by boiling water under pressure with the heat from underground hot rocks and heat sumps. Some places have 'capped' geysers and the presurised superheat runs the turbos directly. Yet other places capture thermal heat from pools etc and are even used to heat water for washing and radiators in homes.