When you release a balloon, it flies upwards due to the principle of buoyancy. Buoyancy is the upward force exerted on an object immersed in a fluid, such as air or water. It occurs because the fluid exerts pressure on the object from all directions, and the pressure is greater at the bottom of the object than at the top.
In the case of a balloon, it is filled with a gas that is lighter than the surrounding air, such as helium. Helium has a lower density than air, which means that a given volume of helium weighs less than the same volume of air.
When the balloon is released, the helium inside the balloon is less dense than the air around it. As a result, the upward force of buoyancy exerted by the air on the balloon is greater than the downward force of gravity pulling on the balloon. This causes the balloon to accelerate upwards.
Additionally, the balloon is usually sealed to prevent the helium from escaping. As the balloon rises, the surrounding air pressure decreases with altitude. The pressure inside the balloon remains relatively constant, causing the helium to expand. This expansion further reduces the density of the balloon compared to the surrounding air, increasing the buoyant force and causing the balloon to continue rising.
It's important to note that buoyancy is a result of the difference in density between the object and the surrounding fluid. If the balloon were filled with a denser gas, it would not experience enough buoyant force to overcome gravity, and it would not fly upwards.