Peat is formed in waterlogged, acidic fens and bogs over thousands of years by the growth of mosses and other plants, which absorb and ‘lock away’ carbon dioxide during photosynthesis. When the moss dies, the waterlogged bog provides anaerobic conditions which, together with the acidity of the bog, prevent the total decomposition of the moss. It accumulates in the bogs in a partially-decomposed state, forming peat.