Answer:
Fossil fuels are converted to Electricity when they are burned.
Fossil fuels contain many hydrocarbon bonds which are broken during combustion.
When fossil fuels are burned carbon and hydrogen react with oxygen in air to carbon dioxide (CO2) and water (H2O).
During this reaction, heat is released which further amplifies the reaction. Electricity is generated by transforming the heat released into mechanical energy. Mechanical energy is then converted to electrical energy in a turbine or generator.
Cheers!