There are many toilet designs; however, most function simply through the natural forces of gravity and a change in pressure.
Typically, a toilet will consist of a tank that acts as a storage reservoir for water. Controlling the flow of water to and from the tank is accomplished by using a fill valve and a flush valve. The tank is either mounted to, or made an integral part of, the toilet bowl. At the rear of the bowl there is an outlet which leads to a large diameter curved pipe, or trapway, which carries waste material to the sanitary drainpipe.
When the toilet is not in use, a small amount of water remains in the toilet bowl because the pressure inside the bowl and the pressure inside the trapway are equal. Depressing a trip lever activates the flush cycle by opening the flush valve flapper and allowing water to feed from the tank to the bowl. Water will travel by force of gravity from the tank to the bowl though a variety of specially engineered passages.
The surge of water to the bowl quickly fills the trapway and displaces the air space within the trapway. The resulting change in pressure causes a siphon to be formed. Water and waste material are drawn though the trapway and out into the sanitary sewer line by the force of the siphon. When enough water has left the tank, the flush valve flapper closes and water flow to the bowl is suspended. As air gradually reenters the trapway, the pressure equalizes and the siphon is lost.
As soon as the water level in the tank begins to drop, a float mounted on the fill valve begins to travel downward. This downward travel activates the fill valve and initiates the refilling of the tank and the bowl with fresh water. As the tank refills, the float begins to rise with the incoming water. The fill valve shuts off when the tank water height reaches a predetermined level. Once the tank has filled sufficiently, the system is ready for another flush cycle.
This same process applies to pressure-assisted and pump toilet designs, expect that supply line water pressure or an electric pump is used to supplement the force of gravity when delivering water to the bowl. Many commercial toilets do not have tank, and use only supply line water pressure to feed water to the bowl.