what is a fossil fuel formed when layers of buried plants and gases are exposed to intense heat and pressure over thousands of years