Coal is a combustible black or brownish-black rock formed from decayed plant matter exposed to heat and pressure over millions of years. It ranges from brown lignite to black anthracite depending on the degree of metamorphosis (coalification). The main methods of mining coal are underground mining (room and pillar, longwall) and surface mining. Coal is crucial as fuel for generating a significant portion of the world's electricity but also presents environmental challenges from air pollutants like sulfur, mercury and carbon dioxide.