Biogas is a clean burning fuel which pollutes far less than many other fuels, including coal.
Usually, biogas is a mixture of gases produced by the action of anaerobic bacteria when they break down organic matter by the process of digestion.
Biomass is needed so that it can be converted to biogas. Biomass includes materials such as plant matter, which has undigested fibers that can be digested by bacteria to yield the biogas. Examples of biomass are wood chips, animal wastes, and crop wastes which all contain stored chemical energy, which was initially solar energy captured by plants via photosynthesis. This biomass can be used to produce biogas.
Biogas contains mainly methane and other gases in a mixture. The biomass is digested by anaerobic bacteria and the gas is collected, stored and transported to where it is needed.
In places like India, family-sized biogas digesters can break down organic household wastes to produce biogas the family can use for cooking, heating and other purposes. Inside these digesters, once the gas has been produced, the remains can be repurposed as fertilizer.
One scientific principle behind the production of biogas is the process of hydrolysis. In this reaction, water molecules interact with the large organic compounds in biomass to cause it to break down in the presence of enzymes supplied by anaerobic bacteria. They form smaller molecules including sugar. Eventually, the sugar is fermented and yields the lactic acid which becomes further reduced by bacterial action to produce hydrogen sulfide gas. Later, due to more bacterial action, methane gas is produced which is the main gas found in biogas. The steps described above are: hydrolysis, acidogenesis, acetogenesis and finally methanogenesis.
The main idea behind biogas production is that if anaerobic bacteria are supplied with large organic macromolecules (like those found in plant and animal wastes), through a series of enzyme-controlled steps, biogas can be one of the end products of this anaerobic chemical reaction.