In wastewater treatment plant, the wastewater is passed through screens and then is allowed to settle down in a large tank. Semi-solids such as faeces that settle down during wastewater treatment are called sludge.
This sludge is removed using a skimmer and then is transferred to a tank where it is decomposed by anaerobic bacteria to produce biogas. This biogas is used as a low-cost fuel for heating, cooking, etc. It is also used to produce electricity.