If you look at a toilet from the side, you should see an S-shaped curve that leads to the drain. This curve goes from the outlet at the bottom of the bowl, up past the standing level of water in the bowl, and back down to the sewer line.
When the toilet is in "standby" mode with water in the bowl, there is an air pocket in the top part of the "S". Water stays in the bowl since it's not going to overcome gravity to go past the hump in the "S".
When you pour water into the bowl, you are doing the same thing as pulling the lever to flush. Water rushes into the bowl. As the level rises in the bowl, the water level also rises within this "S". At a critical point, the water level rises high enough to go over the hump of the S. One this happens, a siphon is formed. Water is sucked from the bowl all the way down the sewer line as water flows in this siphon.
Once the bowl has emptied, air gets sucked in, which breaks the siphon. As water continues to flow into the bowl (from the bucket or the tank) the air once again blocks the hump in the "S" and the bowl fills.

