Methane and carbon dioxide are produced during the biogas production process by a biological process known as anaerobic digestion. Anaerobic digestion is the decomposition of organic matter in the absence of oxygen, resulting in the production of biogas.