Coal and petroleum are both fossil fuels that are formed from the remains of ancient organic matter. Coal forms when plant matter accumulates in swamps and is subjected to heat and pressure over millions of years. Petroleum forms from the remains of marine organisms buried in sea sediments. As these remains are buried deeper, heat breaks them down into hydrocarbon compounds like oil and natural gas. These fossil fuels provide fuel and raw materials for many products after extraction and processing. Coal is used for fuel and in steel production, while petroleum yields fuels as well as asphalt, plastics, and other materials through fractional distillation and chemical processing.