Heat, generated from various sources, can be converted to electricity by using a combination of steam turbines and an electrical generator. In a power plant based on fossil fuels (such as coal, natural gas, etc.) or nuclear fission (of uranium, etc.), the energy generated by the fuel is used to convert water to steam. This steam is used to rotate a steam turbine, which in turn rotates an electrical generator, thereby producing electricity. This electricity is then supplied to our homes and commercial and institutional installations. The electricity generation process is not 100% efficient and some loss of energy occurs during transformation from heat to electricity. Attempts are being made at improving this conversion efficiency and also to decrease our dependence on fossil fuel based electricity. Implementing the use of waste heat and the development of renewable energy options are being researched and implemented.
Hope this helps.