Coal is a sedimentary rock of biochemical origin which is very rich in carbon. This fossil fuel is part of what is generically speaking called coal.
There is hard, non-bituminous coal with 90% carbon content and bituminous coal (70% to 85% carbon content).
It was formed by the slow geological transformation of organic plant matter. It has high calorific value. This is why coal is used to produce energy (heat and electricity).
Coal is also used in the steel industry to produce coke and to reduce iron ore during steel production.
Coal ore with its gangue. © Bresson Thomas, Wikimedia CC by 2.5