A critical part of bicycle maintenance is keeping all of the moving parts well lubricated. It's as simple as finding those moving parts, where metal pieces rub against each other. Wipe down those parts, apply a specially-formulated bike lubricant in moderation—just a drop or two at each pivot point, really—and wipe dry. Here's a step-by-step of the important lubrication points.
The chain, of course, is the most important part of your bike's "transmission." Effectively the drivetrain, it's where you transfer power from your legs to you wheels. Click here for a detailed guide to cleaning and lubing your chain.
Brake and derailleur cables need grease or they'll rust and/or seize up, and then your ability to brake and shift gears will be compomised. On most bikes, the metal cables are at least partially covered by a protective plastic housing that's designed to seal out dirt and water. They don't always work perfectly, though.
Release the brake cables so you have slack to work with. Slide the housing to expose the inner metal cable. Wipe the cable down with a degreaser-soaked rag, and let it dry. If any part of the cable is rusted, replace it stat. Now grease the cable to keep it moving smoothly. Apply a blob of grease to a lint-free rag (old shirts or socks do the trick), hold the greased section between your thumb and forefinger. Then pinch the cable in the rag, and draw it through the grease, wiping any excess from the cable as you go.
To get at your derailleur cables, shift the chain into the largest rear sprocket and, without spinning the pedals or rear wheel, shift it into the smallest rear sprocket. That will give you plenty of slack in the inner cable, and allow you to disengage the housing from the cable stops where it attaches to the frame. From there, you should have the freedom to clean and re-lube the cable as you did with the brake cables.
The front and rear derailleurs are what move the chain between gears when you shift. The rear derailleur is made of many small moving parts, including a couple of pulley wheels. Clean gunk from the pulley wheels, apply a drop of lube to each and wipe any excess off so they appear dry. Shift the gears while turning the pedals, so you know exactly where the moving parts are. Apply lubricant to all of the pivot points, and wipe away excess.
The front derailleur is essentially the same, minus the pulley wheels. Clean it up, shift between front chainrings to identify moving parts, apply lube to them and remove excess. These pivots bear the stress of high physical loads, so it's crucial to keep them moving smooth and friction-free.
The brake and shifting levers located on your handlebars are just as crucial for braking and changing gears as your cables. Apply a drop of lube to the lever pivots and the barrel adjusters to keep them functioning properly, and be sure to wipe away excess.
Apply a few drops of lube to any of your brakes' moving parts (just squeeze the levers to see exactly where the pivot points are). Be careful not to get any lube on your brake pads or rims—ya know, for obvious reasons.
Remove your pedals with a pedal wrench, and clean the threads where the pedals attach to the crank arms. Squeeze a little grease onto the threads, and spread it around with your finger or a clean rag. Reattach the pedals to the crank arm. Next, apply a few drops of lube to the moving part where each pedal spins around the spindle. Work it into the mechanism by spinning the pedal. As always, wipe away the excess.