Plant materials buried under sediments decay to form peat, a compressed mass of plant remains.
Compaction forces water out of the sediments to form lignite, a soft, brown coal.
Further compression and aging turn lignite into bituminous coal, a soft, black coal.
Heat and pressure metamorphose bituminous coal to anthracite, a hard coal that is almost pure carbon.