The topmost layers compressed the layers below. Heat and pressure caused some physical and chemical changes and eventually, some carbon-rich deposits were formed.