The molecules of chemical compounds consist of atoms of two or more different chemical elements. These atoms are kept together in the molecule with electromagnetic forces.
Because of these forces, energy is stored in the chemical compound. This energy is called chemical energy.
In a thermoelectric plant chemical compounds such as oil, coal, lignite, or natural gas are burned (that means they react with oxygen). From this reaction heat is released, which means that part of the original chemical energy is transformed to thermal energy. This thermal energy is used to heat up a boiler filled up with water.
The water transformed into steam under pressure. The steam is released to the turbines transmitting kinetic energy to them, and therefore it cools. The turbines in turn rotate the generators that produce electricity.
The steam after being used to turn the turbines becomes water again. It is still hot, but not hot enough to be used to turn another turbine. This water is often used in homes in the nearby are for central heating and hot water supply. (That means that these houses do not have heaters, or boilers, but the hot water reaches the faucet ready to use, just as the cold water does). If the water is not used for this purpose, a part is evaporated and the rest returns to the river.
In a thermoelectric plant only a 30-50% of the original chemical energy is converted into electricity. The remaining 70-50% is converted to thermal energy (heat) which escapes to the environment.
Have you noticed that the wires that curry electrical energy become hot? Why is this happening? 
Photograph of a turbine
© 2003, Despina M. Garyfallidou Athens-Greece