Bubble water in an automatic bubble gun creates bubbles due to the interaction between the soap solution and the air blown through the gun.
When the trigger is depressed, a motor or fan inside the gun creates a stream of air that passes through a small ring or nozzle. The ring or nozzle is usually submerged in a solution of water and soap or a bubble solution. As air flows through the ring or nozzle, it creates a thin layer of soapy solution around the opening.
The air also creates an area of low pressure within the ring or nozzle. This low-pressure area causes the soap solution to be pulled into the center of the ring or nozzle, where it forms a film or bubble. As the air continues to flow, the air bubble grows until it breaks away from the ring or nozzle and floats away.
The soap solutions used in bubble guns often contain surfactants, which lower the surface tension of the water and allow the film of soap solution to stretch into the shape of bubbles. Air flowing through the ring or nozzle provides the energy needed to stretch the film into bubbles and push them away from the gun.