Igneous rocks are formed when magma underground ... One familiar example is anthracite coal, which is made almost entirely of carbon. It formed when dead plants fell into swamps long, long ago ...