After 250 million years of heat and pressure, the fossils began to change from their organic state into hydrocarbons, which are substances containing both hydrogen and carbon. The hydrocarbons are protected by sedimentary rock. The rock can effectively protect the hydrocarbons because it is inorganic and contains no carbon.