Anthracite forms from the accumulation of plant debris in a swamp environment. When plant debris dies and falls into the swamp, the standing water of the swamp protects it from decay.
Basalt forms when lava reaches the Earth's surface near an active volcano. The temperature of lava is between 1100 to 1250° C when it gets to the surface.