Biogas is a mixture of gases (mainly methane and carbon dioxide) produced by the anaerobic digestion (without oxygen) of organic matter by bacteria. This gas can be burned to produce heat or electricity, or it can be purified and used in the same way as natural gas.