Fossil fuels such as coal, oil, and natural gas are formed from the remains of ancient plants and animals over millions of years. Coal forms as plant material is compressed over time, progressing from peat to lignite to bituminous coal and finally anthracite. Oil and natural gas form similarly from the remains of sea creatures compressed underground. These fossil fuels are refined and used worldwide to generate electricity, fuel vehicles and machinery, heat homes, and produce many other useful products. Major oil spills like the Exxon Valdez and Deepwater Horizon disasters demonstrate the environmental risks of drilling and transporting fossil fuels.