The other day I came across something talking about a spill proof mug. Since I do tend to spill drinks occasionally, I wanted to read about it.
The cup uses a suction on the bottom of it to help prevent it from tipping over. Once the mug forms a seal with the surface it is on, the air pressure under it becomes smaller than the atmospheric pressure above the cup, resulting in the downward force keeping the cup on the table. Even when a small force is applied to the top of the cup that would usually tip the cup over, the suction on the bottom of the cup keeps the cup upright.
Here’s a picture of the forces acting on the mug to keep it upright: