The toilet works with a simple mechanism and is based on gravity. Every toilet commode consists of a bowl, the flushing mechanism and, a refill mechanism. The most vital component in the bowl which can do all the functions a toilet needs to perform alone without the need for a tank if required.
The bowl is attached to a pipe with an S-bend to the sewer.
Activating the flush lever lifts a flapper valve to allow the designated amount of water to flow into the bowl to begin the flushing action. The weight of the water needs to pass a certain threshold to work.
You can set up a simple experiment to convince yourself: first throw a glass of water in the toilet bowl.
Nothing happens. Fill up a bucket with water and throw its content into the bowl and you’ll notice almost all of the water is sucked out of the bowl, and the bowl makes the recognizable “flush” sound.
So for the siphon to work you need to release a certain amount of water and fast enough.
Once the level in the bowl is greater than that at the top of the S-bend, gravity begins the siphon. That gurgling sound at the end of the flush is caused by air entering the siphon tube. So that’s how a flushing toilet works!