What is the function of anaerobic micro-organisms such as anaerobic bacteria in a biogas plant?

Anaerobic bacteria help in the degradation of cow-dung in the presence of water but in the absence of oxygen and hence produces biogas. The most of the important bacteria involved in biogas production process are anaerobes.