Coal, consisting principally of carbon, was formed millions of years ago from the remains of vegetation that was submerged in swampy water, altering the pattern of decay.
(the remains of vegetation; was submerged; in swampy water)
the remains of vegetation
was submerged
in swampy water