Dear student.
Flocs are masses of filamentous bacteria held together by slime and fungal filaments to form mesh-like structures. These flocs digest a lot of organic matter, converting it into microbial biomass and releasing a lot of minerals. This reduces biochemical oxygen demand.
Sludge obtained through wastewater treatment plant is anaerobically digested to produce biogas. Anaerobic digestion (actually fermentation) of sludge is required in order to produce gases like methane, hydrogen sulphide and carbon dioxide forming biogas. For doing this, sludge containing organic matter and microbes are degraded by another kind of bacteria, which grow anaerobically, digest the organic matter, bacteria and the fungi in the sludge. This results in the production of biogas which can be used as source of fuel.
Regards.