The center of gravity (center of mass) is the point on an object that when supported on that spot, the object will balance.
A line through the center of gravity of an object is always vertical. Note that the leaning soda can in the diagram is balanced where the center of gravity of the can touches the table. The volume of liquid in the can is such that a line through the center of gravity (center of mass) of the can passes though the bottom of the can as shown.
A tilted object will not fall over as long as the line through its center of gravity does not fall past the base of the object.
In the following video, a balancing soda can is used as a game. The object being to balance three soda cans on their bottom edge. I suggest that you change the rules and use soda cans filled with water. Then instead of drinking the liquid, kids can pour out or add water to the cans as needed.
The second video shows a more engaging Challenge.
Advanced Challenge–Try this: