Handguns are pretty straight forward.
Take the magazine out, clear the weapon, go put the ammo someplace away from where you're cleaning and clear the weapon a second time to be sure.
Clear the weapon a third time.
Youtube how to field strip it if you don't already know how. Once you get it broken down into the slide, barrel, recoil spring/guide rod, and frame, do the following.
Give everything a light scrubbing using a nylon brush/tooth brush and Hoppe's #9 solvent (available at Wal-Mart, any sporting goods store, etc.) This will clean most of the soot, dirt, carbon, and old lube off the gun. Take a bronze brush and go over the barrel's feed ramp to get the hard carbon off there if there is any. Do the same with the bolt face (the part of the slide where the firing pin comes out of). Make sure you get anything that might be inside the little hook of the extractor. Use a clean dry cleaning patch to wipe everything off until it's clean. Cleaning the inside of the barrel of a handgun is not really that necessary that often, but if you do: 1: Run a cleaning patch with Hoppe's on it going the same direction the bullet travels. 2: Run a bronze barrel brush of the approprite size the same direction. 3: Run a dry clean patch also the same way. 4: Go back to step one and repeat until the patches come out free of black stuff.
Take a patch with a little Hoppe's on it and clean off the guide rod and spring. Be careful not to bend or warp the spring. Just give them a once over, no need to scrub.
You can run another patch with a light coating of lube down the barrel if you want. Some people feel this protects the steel and inhibits rust. It's not crucial, but it won't hurt if it gives you peace of mind. Use a very small amount. Apply small amounts of lube to the parts on the slide and frame where they meet and rub against each other. You don't need a lot, just so it shines with a wet sheen. Put the gun back together.
Clear the weapon again. Work the slide back and forth to get the lube where it needs to go. While the gun is clear and pointed someplace safe, dry fire it a few times to function test it (don't do this if it's a .22lr).
Clear the weapon again, and reload it safely.
Good lube to use: FP10. You can also get some RemOil to wipe down the surface of the gun when you're done cleaning it to protect it.