How
bubbles work is actually really interesting if you think about it.
Firstly, how do bubbles happen? Bubbles are spheres of air surrounded
by a really thin layer of liquid. The surface is held together by
surface tension. If you fill up a glass of water you will see that
you can overfill it by a bit and it won't overflow - it is surface
tension that holds the water together. This works because of something
called hydrogen bonding.
Water is made up of an oxygen atom covalently bonded to two hydrogen
atoms. Because the oxygen likes electrons, it pulls the electrons
in the covalent bond towards itself, making it slightly negatively
charged and the hydrogens slightly positive. This uneven distribution
of charge means that the oxygens in water are attracted to hydrogens
of other water molecules, and this makes water sort of sticky.
Water molecules are in an ongoing tug of war with the molecules
all around them. At the surface, water is only pulled from below
as there are obviously no water molecules above. This creates
surface tension.

If you've ever tried to blow bubbles with only water you will
have found that this doesn't work. This is because the surface
tension of water only is too high for bubbles - the pull causes
the bubbles to pop. This is why we have to add soap to the mixture.
If you go back to the overfilled glass of water and gently touch
the surface with a finger which has a tiny amount washing up liquid
on it, the water will spill over the side of the glass (do this
will a finger dipped in water only and you're fine). This tells
us that the soap is breaking the surface tension.
Soap molecules are long chains of carbon and hydrogen atoms -
there is a hydrophobic (water hating) end and a hydrophilic (water
loving) COO- group on the other end. This polarity means that
the soap molecules will orientate themselves in water so that
the hydrophilic ends point inwards and the hydrophobic ends point
out. The soap molecules force the water molecules apart and this
reduces the hydrogen bonding and therefore the surface tension
to around 1/3 that of pure water.
So why are bubbles always spheres? If you tried to blow different
shaped bubbles, you will have failed. This is because bubbles
are always perfect spheres. Imagine the thin layer of liquid surrounding
the air inside a bubble as a stretchy layer that will shrink to
the minimum size around the air inside. For a fixed volume, a
sphere will always have the smallest surface area. To illustrate
this, consider a cube and a sphere of equal volume (the area inside).
So what about the colors of bubbles? Well white light is made
up of the whole spectrum of colors in the rainbow, all of them
have different wavelengths - the color of something depends on
which wavelengths are reflected and detected by our eyes.

The liquid layer of a bubble is like a sandwich - it has two
layers of soap molecules surrounding a layer of water molecules.
Light is reflected from both layers of soap molecules and if two
light waves happen to meet, you can get interference. Image two
light waves meet - they can either cancel each other out or they
can make one wave that is much stronger. This acts to either remove
a certain color or makes it brighter. You see what's left after
all the interference.

The colors left depend on how far the light waves travel before
they meet and this depends on the thickness of the soap film.
Wind makes the colors swirl and change by altering the thickness
of the film. You can tell when a bubble is just about to burst
because the film gets so thin that all the reflecting wavelengths
cancel each other out and it looks black.