Gases normally spread out. But sometimes they get trapped inside liquid. Then we call the gassy part of the liquid a bubble.
Because gases are much lighter than liquids, bubbles rise to the surface of a liquid very quickly, then burst out of the liquid.
Sometimes gases can be trapped inside a thin film of liquid. This is what produces a soap bubble.