Coal is a sedimentary rock that is composed of carbon, though a few other elements, such oxygen, nitrogen, hydrogen, and sulfur can also be present in small amounts. There are basically four types of coal - lignite, sub-bituminous, bituminous, and anthracite.