Stages for processing sewage

Describe the stages for processing sewage. At what stage of processing is it permissible in the United States to dispose of wastewater from sewage into waterways?