there are 3 main types of fossil fuel - oil, gas and coal
Oil and gas
Oil and gas is what it says. Over billions of years, oil and natural gasses got trapped between layers of rock in the earth's crust. This hapend when plants and animals died in the sea bed or in water. As time passed, more particles of old rock got deposited in the same place and over time formed sedimentary rock.
Coal
Coal was formed when dead plants got berried in mud millions of years ago. This mud stopped it rotting, but also squashed the fossils and pushed them closer to the core. After that the earth heated it and it turned into coal.
Oil and gas is what it says. Over billions of years, oil and natural gasses got trapped between layers of rock in the earth's crust. This hapend when plants and animals died in the sea bed or in water. As time passed, more particles of old rock got deposited in the same place and over time formed sedimentary rock.
Coal
Coal was formed when dead plants got berried in mud millions of years ago. This mud stopped it rotting, but also squashed the fossils and pushed them closer to the core. After that the earth heated it and it turned into coal.