Burning of fossil fuels is also known as combustion. During this process, fossil fuels (like petroleum, natural gas, and coal) are burnt to produce carbon dioxide, water and energy in the form of heat.
This is because hydrogen and carbon of fossil fuels undergo reaction with oxygen to form carbon dioxide and water.