One of the best introductory books is "Bicycling Magazine's Complete Guide to Bicycle Maintenance and Repair". The Zinn books, "Zinn and the Art of Road (or MTB) Bike Maintenance" are a bit more advanced but also very useful.
Sutherland's Handbook and the Barnett's handbook are very advanced and detailed (and expensive) and assume a relatively high level of pre-existing knowledge.
The Park Tool web site and Sheldon Brown's web site are free and excellent sources of information on most facets of bike repair too.
Finally, RTFM. All bicycle components come with detailed installation instructions and technical information. If you buy a new component, read the instructions that come with it or go to the manufacturer's web site's technical documents section. . It's amazing how many questions we get here that are clearly answered by the accompanying instruction sheet.