There are three major fossil fuels: coal, oil, and natural gas. Coal forms from peat deposits over millions of years, progressing through lignite, bituminous coal, and finally anthracite. Coal is ground up and pumped through pipelines to power plants. Oil forms from the remains of tiny sea creatures and is refined for use in vehicles and other machinery. Natural gas forms near oil deposits and is used for heating and electricity generation.