coal measures are formed like this. a low-lying tropical swamp or rain forest forms a peat swamp which is short of oxygen. dead plant material builds up, and does not decompose entirely. the plant material gets buried as a peat bog. from time to time rivers bring down a load of sediment from nearby mountains, covering the swamp. eventually layers of coal alternate with layers of sandy deposit. pressure turns it all into hard rock. later on, the rocks are uncovered by erosion, and fossils can be found by humans.