The Detroit Water and Sewerage Department (DWSD) employs the activated sludge method of wastewater treatment. This is a biological process that uses air and a floc composed of bacteria and protozoa. The end products are cleaner (but not drinkable) water, sludge and gasses (that aren’t captured).
Anaerobic digesters are a more common technology used in such facilities. Anaerobic digestion occurs naturally. “Anaerobic digestion is a collection of processes by which microorganisms break down biodegradable material in the absence of oxygen.” Along with water and other things, it produces methane, which is captured and used to generate electricity.
In Orange County CA, a system which cost less than $500 million recycles wastewater to drinking water in three-steps: microfiltration, reverse osmosis and ultraviolet light with hydrogen peroxide. It’s expensive to operate, but not as much as desalinating seawater.
Singapore has adopted a similar wastewater treatment procedure for application after conventional methods. Its NEWater technology produces extremely pure water that is sold for special industrial uses or mixed with reservoir water and treated in the customary manner for drinking.