how to choose inner tubes

I've always bought 700x28/38 Specialized inner tubes for my bike, because that was what I was told fitted. But what do those numbers mean? How do I know that a specific inner tube will fit my bike?

-

700 is the size of the wheel and tire which the tube is intended to fit. In this case, 700 means 700c, or ISO diameter 622mm rims. If you are unfamiliar with tire sizes, take a look here.

28/32 designates the min/max range of width of the tire which the tube is intended to fit, in mm. So in your case, your tubes are designed to fit tires of width 28mm (minimum) to 32mm (maximum). This range should correspond to the width of your rim as well.

Edit: From @Benson's comment on this answer (in case it gets deleted)

Using a tube that's too big will mean it's exceedingly hard to get your tire back on, because the tube will have to fold out of the way. You'll risk pinching and damaging the tube as you put your tire back on. If you use a tube that's too small, you'll risk the tube stretching too far, which makes it much more vulnerable to popping.

-
Using a tube that's too big will mean it's exceedingly hard to get your tire back on, because the tube will have to fold out of the way. You'll risk pinching and damaging the tube as you put your tire back on. If you use a tube that's too small, you'll risk the tube stretching too far, which makes it much more vulnerable to popping. – Benson Feb 15 '11 at 22:29
@Benson Thanks, that's something I didn't think about when I initially answered. The risk of pinch flats is enough to convince me— I changed my mind and my answer based on your insight. – Jason Plank Feb 16 '11 at 20:35
One thing to keep in mind is that tire widths vary from the stated width. I've measured 32mm tires that were actually 30mm. The larger width tires tend to be slightly narrower than stated. – David G Apr 23 '11 at 15:31
Using a tube that's too narrow can cause the tube to "telescope" as it inflates, leading to early failure. Or the wheel may develop a lump near the valve. – Daniel R Hicks Jun 6 '15 at 11:17

The numbers refer to the dimensions of the tires that the tube is meant for. 700 is the wheel diameter in mm, and 28/38 means that the tube will fit tire widths from 28-38 mm.

As far as I know, the dimensions used are the same that are printed on tires, so you can just look at your tire to know which tubes will fit.

Note that tubes are much more flexible that tires, so a given tube will fit a range of tires (hence the "28/38"). Often shops will only stock two or three tube sizes, which cover all common tire sizes.

-
The first number isn't the wheel diameter in millimeters, or inches. It's just the wheel size specification, in all it's madness. – lantius Feb 19 '11 at 23:00