Biogas is basically a combination of different gases, mostly carbon dioxide and methane, produced by certain kind of microorganisms, usually in the absence of air or oxygen.

This absence of oxygen is called anaerobic condition. Animals that eat more of plant material, especially grazing animals such as cattle, produce large amounts of biogas.
However, it is important to note that the cows themselves do not produce this biogas. In fact, this gas is produced by millions of microorganisms that live in their digestive systems. Biogas can also develop in bogs and at the bottom of lakes, where there is a lot of decaying organic matter, built up under wet and anaerobic conditions.

