Any bicycle pump will inflate a tire, but not every pump will inflate every tire. Most cyclists will want at least two pumps: one for a home or shop and a portable pump to take on rides. Identify what's available, purchase the right pumps for your bike and you'll always be prepared to fix a flat tire and inflate to pressure.
Before even thinking about the pump mechanism, be sure the pump has the correct head for your valves. Valves types are Schrader (like a car valve) and Presta (tall, skinny metal valve). Some pumps feature separate heads or attachments to be used with both valve types while others only work with one.
Home: Floor Pump
When shopping for a home pump, the best option is a quality metal floor pump. These vertically-oriented pumps feature a metal shaft and horizontal plastic handle that is used for pumping. There is a base that you can stand on with your feet to provide stability. Many floor pumps include pressure gauges, which can be used to measure the air pressure in the tires. Floor pumps can be expensive in comparison with other types, but they provide a reliable, steady flow of air into your tire and are a quick, durable pump.
Home: Foot Pump
If you use a Schrader valve, another option for your home pump is a foot pump. Like the name indicates, these pumps are designed to be pumped with your foot--basically step on it to pump. Foot pumps are more compact and less expensive than floor pumps. They are a little easier to transport from place to place if you have limited space. Foot pumps are usually less durable than floor pumps and can suffer quick wear and tear, particularly if used incorrectly.
Road: Frame Pump
Frame pumps are compact pumps that get their name from the fact that they're designed to be mounted onto your bike frame. Beware that not every frame pump is compatible with every frame and some frames may make frame pumps an unusable option. Frame pumps are much slower when inflating tires than the home pumps above but are an important part of roadside repair.
Shrinking down in size from the frame pump, the mini-pump is the smallest manual pump available. Mini-pumps are excellent for those whose frames don't allow for mounting of frame pumps. They're also a good way of conserving space and cutting weight. Some mini-pumps are so compact that they can slide right into a saddle bag or hydration pack. Of course, the downside of such a small pump is that it's even more slow and difficult to use than a frame pump. For the best results, try the pump out before purchasing to get a feel for how difficult it is to operate.
Road: CO2 Inflators
Solving the problem of difficult, lengthy pumping of other portable designs, the CO2 inflator uses CO2 cartridges in place of manually pumping. Simply screw the cartridge in and deploy the gas into your tires. These pumps can be as compact as a tiny head that attaches onto the cartridge. They provide an excellent combination of compact profiles and quick, easy filling. The main downside of the CO2 inflator is that it can leave you high and dry if you run out of cartridges, unlike manual pumps that aren't exhaustible (unless they break). Be sure to practice using the inflator prior to riding so that you don't waste cartridges on the road.