An air bubble rises to the top of a glass of water because the density of the air bubble is less than that of water. Density is the property of matter that describes how heavy something is in relationship to its volume.
Any item in a liquid that has a lower density than the liquid rises. Heavier items sink, unless they are specifically shaped to displace enough water, such as in the case of a boat’s hull.
The rate of ascent of a bubble in water is quite difficult to calculate. The amount of water resistance, which affects the rate of ascent, acting against the bubble depends on the size of the bubble, purity of the water, turbulence in the water, composition of the gas inside the bubble and other factors. In some cases, bubbles large enough break into smaller bubbles, further complicating the ability to predict the speed of the bubble rising. In general, larger bubbles rise faster because the force of buoyancy increases more as the volume of the bubble increases, compared to the water resistance acting on the bubble. A helpful comparison is comparing small dust particles floating slowly down in the sky versus large particles that fall faster.