explain the process of formation of coal and petroleum