Coal is made of carbon and also has more elements like hydrogen, oxygen, sulfur and nitrogen.
Coal starts as plant matter at the bottom of ocean/water. Eventually it is covered and buried by sediments where over a while, metamorphosis (a change in form) happens.
Coal is also one of the biggest, if not the largest, source of energy for the making of electricity.