how is coal formed in the ground