The heat that is used to burn fossil fuels cause molecules of carbon and hydrogen to react and produce large amount of energy. ... When they are exposed to heat, the hydrocarbon chain converts the heat energy contained in the fossil fuel to electrical energy to create electricity or mechanical energy to drive the engines.