The overall aim of treating sewage is to produce an effluent that can be discharged to the environment while causing as little water pollution as possible, or to produce an effluent that can be reused in a useful manner. This is achieved by removing contaminants from the sewage. It is a form of waste management. 
With regards to biological treatment of sewage, the treatment objectives can include various degrees of the following: to transform or remove organic matter, nutrients (nitrogen and phosphorus), pathogenic organisms, and specific trace organic constituents (micropollutants). 
Some types of sewage treatment produce sewage sludge which can be treated before safe disposal or reuse. Under certain circumstances, the treated sewage sludge might be termed biosolids and can be used as a fertilizer.