One can treat waste in three ways:
Yes, they are in order of preference i.e. primary, secondary and tertiary treatment respectively.
From a broad perspective, these three ways can be further divided into the following ways:
- Sedimentation (Clarification)
- Flotation and Skimming
- Ion Exchange
- Activated Sludge Treatment Methods
- Trickling Filtration
- Oxidation Ponds
- Aerobic Digestion
- Anaerobic Digestion
- Septic Tanks
This post will look at the first one in detail followed by the two in the next articles.
So, how to remove mechanical debris from waste water?
This is how:
Wastewater is pre-treated to remove large floating and suspended solids which could interfere with the normal operation of subsequent treatment processes.
Pre-treatment consists of:
- Grit removal
Screens of various sizes and shapes are used, depending on the nature of solids to be removed, and cleaning is done either manually or mechanically. Fixed bar screens are the most common type of screens used in domestic wastewater treatment facilities. Bar screens are made up of parallel metal bars and have apertures in the range 20-60 mm for coarse screens and 10-20 mm for fine and medium screens. Where a fine screen is employed, it is usually preceded by a coarse screen to remove large solids in order to avoid clogging problems. Methods of disposal include burial, incineration, grinding and digestion. To avoid disposal problems, some treatment plants use a device known as comminutor instead of the screens. The comminutor grinds large solids which can then be satisfactorily handled in the sedimentation tank. After screening, the wastewater enters a grit chamber for the removal of inorganic grit, consisting of sand, gravel, cinder and pebbles. Grit chambers are provided to protect pumps from abrasion and to reduce the formation of heavy deposits in pipes and channels. The grit can be removed by scrappers. When comminutors are used in place of bar screens, they are generally placed after the grit chambers. 
Settleable solids are removed by gravitational settling under quiescent conditions. The sludge formed at the bottom of the tank is removed as underflow either by vacuum suction of by raking it to a discharge point at the bottom of the tank for withdrawal. The clear liquid produced is known as the overflow and it should contain no readily settleable matter.  The process of sedimentation involves the separation from water, by gravitational settling of suspended particles that are heavier than water. The resulting effluent is then subject to rapid filtration to separate out solids that are still suspended in the water. Rapid filters typically consist of 24 to 36 inches of 0.5 to 1-mm diameter sand and/or anthracite. Particles are removed as water is filtered through the media at rates of 1 to 6 gallons/minute/square foot. Rapid filtration is effective in removing most particles that remain after sedimentation. The substances that are removed by coagulation, sedimentation, and filtration accumulate in sludge which must be properly disposed of. 
Types of sedimentation tanks used for this operation are:
- Rectangular horizontal flow
- Circular radial flow
- Vertical flow 
Floatation may be used in place of sedimentation, primarily for treating industrial wastewaters containing finely divided suspended solids and oily matter.
Floatation is used in:
- Paper Industry: To recover fine fibres from the screened effluent.
- Oil Industry: For clarification of oil-bearing waste.
- Treating effluents from tannery, metal finishing, cold-rolling, and pharmaceutical industries. 
The process of flocculation is applicable to aqueous waste streams where particles must be agglomerated into larger more settleable particles prior to sedimentation or other types of treatment. Highly viscous waste streams will inhibit the settling of solids. In addition to being used to treat waste streams, precipitation can also be used as an in situ process to treat aqueous wastes in surface impoundments. In an in-situ application, lime and flocculants are added directly to the lagoon, and mixing, flocculation, and sedimentation are allowed to occur within the lagoon. 
Microstraining utilizes a rotating drum-type filter to screen suspended solids. The filtering media consist of a finely woven stainless steel fabric with a mesh size of 23 to 35 microns. The fabric is mounted on the periphery of the drum and water is allowed to pass from inside to the outside. Back-washing is accomplished by high pressure water jets placed at the highest point of the drum. The solids which are retained on the fabric are washed into a trough, which recycles the solids to the sedimentation tank. 
Microfilters are small-scale filters designed to remove cysts, suspended solids, protozoa, and, in some cases, bacteria from water. Most filters use a ceramic or fiber element that can be cleaned to restore performance as the units are used. 
A typical sand filter system consists of two or three chambers or basins. The first is the sedimentation chamber, which removes floatables and heavy sediments. The second is the filtration chamber, which removes additional pollutants by filtering the runoff through a sand bed. The third is the discharge chamber. The treated filtrate normally is then discharged through an underdrain system either to a storm drainage system or directly to surface waters. Sand filters are able to achieve high removal efficiencies for sediment, biochemical oxygen demand (BOD), and faecal coliform bacteria. Total metal removal, however, is moderate, and nutrient removal is often low. Figure below illustrates one type of configuration. Typically, sand filters begin to experience clogging problems within 3 to 5 years. Accumulated trash, paper, debris should be removed every six months or as needed. Corrective maintenance of the filtration chamber includes removal and replacement of the top layers of sand and gravel as they become clogged. 
Figure: Example of a sand filter configuration 
- Environmental Pollution Control Engineering, by C.S.Rao
- Handbook of Water and Wastewater Treatment Technologies by Nicholas P. Cheremisinoff
Read more: Wastewater Treatment Methods and Disposal