This article is from the Bicycles FAQ, by Mike Iglesias with numerous contributions by others.
You can buy tools from many sources. Some tools can be purchased at
your local hardware store (wrenches, socket sets, etc), while the
special bike tools can be purchased from your local bike store or
one of the mail order stores listed elsewhere.
You can buy every tool you think looks useful, or just buy the tools
you need for a particular repair job. Buying the tools as you need
them will let you build up a nice tool set over time without having
to drop a lot of money at once.
Some common tools you will need are:
Metric/SAE wrenches for nuts and bolts (or an assortment of adjustable
Screwdrivers, both flat and phillips.
Metric allen wrenches.
Wood or rubber mallet for loosening bolts.
Special tools and their uses:
Cone wrenches to adjust the hub cones.
Chain tool to take the chain apart for cleaning and lubrication, and
to put it back together.
Tire irons for removing tires.
Spoke wrenches for adjusting spokes.
Cable cutters for cutting cables (don't use diagonal pliers!).
Crankarm tools for removing crankarms.
Bottom bracket tools for adjusting bottom brackets.
Headset wrenches to adjust the large headset nut.