The breakdown of organic matter in the absence of oxygen (anaerobically), primarily consisting of methane and carbon dioxide produces the mixture of gases that is called Biogas.
Organic waste (carbon) which biodegrades by means of bacteria in an anaerobic environment produces biogas.
This energy release allows biogas to be used as a fuel; it can be used for any heating purpose, such as cooking.
It can also be used in a gas engine to convert the energy in the gas into electricity and heat.