To put it simply, solubility is the amount of solute that a solvent can hold in solution (got all that?). It might be easier for you if you think about stirring sugar into water. You add a little, it stirs right in and all the sugar dissolves. If you keep adding more and more, the water eventually won't be able to hold any more, and the sugar will start precipitating out to the bottom of the glass.
Water also dissolves other things, like gases. In addition to trace amounts of minerals, some of the nitrogen and oxygen from our air is dissolved into the water.
Now here's the important part_ The solubility of water isn't constant, and is affected by temperature and pressure. When these things change, the amount of stuff that your glass of water can hold changes.
Hot water will be able to dissolve more sugar than cold water. This fact is often demonstrated by making rock candy in grade school science lab. Heat water up to boiling, and stir as much sugar in as you can. Then, stick a popsicle stick in the solution and let the water slowly cool. Over a day or so, crystals will start to form.
What happened? Well, a few sugar molecules stick to rough spots on the stick. These are called sites of nucleation. A few more molecules of sugar will start to stick to those, then a few more, and soon visible crystals will start to form. All this happens because the solubility of the water has decreased as it cools. So the water can't really hold all the sugar anymore, and the sugar desperately wants to get out of solution.
The same principle is at work with your glass and air bubbles. There are dissolved gases in the water, and imperfections in the glass serve as nucleation sites. That's why you see bubbles sticking to the edge of the glass. Over time, if the bubbles keep growing, the force compelling them to rise will overcome the forces sticking them to the side of the glass, and the bubbles rise to the top and disperse. To speed this up, you can tap the glass to help the bubbles break free from their nucleation site, and a bunch of them will rise at once.