Algeria has a fragile ecosystem, characterized by a relative scarcity of water resources and their preservation is a vital imperative. The excessive intake in the natural environment of nitrogen and phosphate load in wastewater, from agricultural activities, domestic and industrial pollution, represents a pollution threat and a serious danger to the aquatic environment. Municipal wastewater contains various wastes, and usually consists of about 99.94% liquid and 0.06% solids. If this wastewater is not treated or improperly collected, it can affect both public health and environment. In our study, we will focus on the biological treatment by natural lagoon and activated sludge, which suits perfectly our country, where space and climate are favorable factors; our main objective is to eliminate the maximum existing phosphorus in wastewater by these biological treatments, which can actually eliminate total phosphorus. Through these modes of treatment we try to remove the maximum of organic matter and phosphorus in the wastewater. Consequently, the receiving environment is preserved.