In front, there are either two or three chainwheels. The innermost, smallest chainring is intended for spinning up steep hills. It's also called ``granny gear'', presumably to indicate who would need one. Me, I prefer two chainrings on road bikes because I don't have to worry about overshifting, because I have to worry less about extreme chain lines, and because I haven't yet met a mountain that was not easier to climb without a granny gear. The problem with the chainline is that a chain should not run from an inner cog to an outer chainwheel or vice versa.
There are cassettes with eight, nine, or ten cogs on the rear hub (for hub types, see the chapter on wheels). Cassettes with five to seven, and arguable eight, cogs are obsolete. At the time of this writing (2006), nine cogs are still available but fading, and people switch to ten. Ten-cog cassettes require a special narrow chain, and derailleurs and levers may not be compatible, so I recommend going with ten. In most cases, the number of cogs must agree with the type of shift levers; it cannot be upgraded without also replacing the shift lever. Usually cassettes from one vendor cannot be mixed with shift levers from another vendor. There are some exceptions, for example Sachs is said to work with Campagnolo, and Campagnolo sells replacement ratchets to convert levers.
Chains must be the single most neglected part of the typical bicycle. It seems that every other bicycle I see has not been lubricated for years. Unlubricated chains squeak pitifully, make pedaling much harder, and destroy chainwheels and cogs. The problem is that rust and other particles get between the bolts and sleeves of the chain and wear them down, so that the chain gets loose and hence very slightly longer. This means that the distance between two chain links no longer matches the distance between two chainwheel and cog teeth. When this happens only one link connects with a tooth, all others are loose because of the slack. This one tooth takes the entire force and gets worn into a ``shark fin'' shape. If this shape is pronounced enough, the chain won't even roll smoothly off the cog or chainwheel; instead the chain will be grabbed by the shark fin.
The insidious part of this is that you don't notice it until the cogs you use most are already destroyed. Replacing the chain will seem to make matters worse because now all links of the chain get hooked by all the shark fin teeth of the cog simultaneously, which will make the chain skip. This makes the cog unrideable. The only option at this point is to replace all the worn cogs together with the chain.
To prevent this from happening, it is important to lubricate the chain frequently, at least every three weeks or so, more often when riding in wet weather. Before lubricating the chain, it must first be cleaned with an old T-shirt. You can run the chain through the fabric, but it's really better to clean each link individually. It will only take a few minutes. You should also clean the cogs, chainwheels, and especially both pulleys in the rear derailleur. Then, lubricate the inside liberally, and run the chain through at high speed for some time. Then, wipe off all excess lube. This is important because only the lube inside the chain will do any good, the rest just attracts dirt and increases wear. Ride around the block and wipe off excess lube again.
There is much debate about the best chain lube. You can't go wrong with synthetic bicycle chain oil, perhaps containing suspended Teflon or other lubricating particles. Don't use regular (WD-40 or other) machine oil because its viscosity is too low to stay in the chain for very long, and don't use motor oil because motor oil is designed to work in certain (hot) environments only. Grease doesn't work too well because it won't reach the critical parts, you'll wipe off most of what you apply. This is even more true of wax. Don't use gasoline to clean your chain, it will remove the factory grease packing of the inner surfaces and you'll never be able to restore them sufficiently. Chains are not that expensive.
See also an article on "Replacing a chain"