Sewage is a kind of waste water produced by a community of individuals that is comprised of feces and other waste products.
Both ground and space based water treatment facilities were often used to process the sewage back into its component elements in order to make them suitable for recycling. Water from sewage was processed back into potable water for purposes such as drinking and other uses. Solid waste material from sewage was processed into raw materials for food synthesizers. (DSC novel: Drastic Measures, TNG reference: Star Trek: The Next Generation Technical Manual, DS9 - Millennium novel: The Fall of Terok Nor)