Never forget the most important factor in a well-running drive-train is cleanliness, and this dramatically affects the frequency at which you should be lubricating your chain. As a general rule I recommend applying fresh lubricant every 100 miles (160 km) ridden plus after each ride in wet conditions. For most folks this is likely a bit frequent, but it isn't long after practicing regularly before you can determine for yourself how frequently to clean or lubricate your chain.
Note that if you intend to switch to another brand or type of lube, the chain should be quite clean to start. Some lubricants very much prefer to start on bare metal, so this may require removal and soaking in biodegradable degreasing solution. Hopefully you’re happy with the lube you’ve been using, so you can simply add oil and clean all in one process without removing the chain.
Rather than allow old and dirty or excess lubricant to overspray or drip inside your house, this is best done outside, or at least in your garage. Hanging your bike, using a repair stand or car-trunk/hitch rack, works great. All you really need though is to lean the bike, standing on its wheels, fairly straight and upright against something solid. The drive-side should face you, and pedals and chain can spin freely backwards without striking anything. If you’re feeling especially clever you might find a way to secure the bike so it leans toward you slightly, helping to prevent excess lubricant from spattering onto your rim’s braking surface.
You probably have two options for application: drip and spray. Drip is usually more economical, is certainly less wasteful, and easier to control. With spray you’re paying more for the propellant and spray mechanism. Although spray is faster to apply, it is also messier, and probably requires more time and effort to clean up afterward. For either option you will also need a dry shop rag or a couple paper towels.
Using a drip:
Choose an easily identifiable link, such as the reinstallation pin or "master" link, if possible and position it on the lower section of chain just behind the front sprockets. Carefully drip one drop of your favorite lubricant on each roller all the way along the lower chain until you’re as close as you can comfortably get to the derailleur pulleys beneath the rear cogs. Stop, and rotate the crank backwards just enough to move the most recently lubed link forward to behind the sprockets again. Repeat beginning from there, applying along the chain until you reach the pulleys. After doing this about 3-4 times you should be able to tell that you’ve reached the first link you lubricated, the entire chain is oiled, and there’s no need to go further.
Put the bottle of lube down and spin the crank backwards several times with your right hand, allowing the chain to flex over the gears and through the pulleys, permitting the fresh lube to penetrate the tiny rollers in the chain. Now pick up a rag or paper towel and, gently wrapping your left hand around the lower chain, continue rotating the crank (with your right hand), drawing the chain through the rag in your left hand. You can stop and re-situate the rag as many times as you like. If it becomes saturated before you’re satisfied, switch to a clean rag, spinning while you wipe off the excess. What you’re trying to do is wipe off any lube from the exterior surface of your chain. Don’t worry… you’ll never get it all, and what you do get should not be there anyway. The lube that will make your chain run smoother has already penetrated and you can’t wipe it off. What you are wiping away however includes lots of road grime and abrasive dirt, so you’re lubing and cleaning simultaneously, and minimizing the excess that could attract more grit, which wears your chain and gears as you ride. All the lubrication your chain needs will remain inaccessible beneath the rollers.
This is nearly identical to the above procedure except that you simply spray the chain, with your left hand, just as it passes over the rear cassette cogs while you rotate the crank in your right hand. This generates quite a bit of over-spray, and you’ll want to be careful not to get much on the braking surfaces of your rim, or rotor if you have disc brakes. One nifty thing about doing it this way however is often you may feel in your hand a noticeable drop in resistance, especially if some time has passed since the last time this was done, serving as a demonstration of how beneficial a lubed chain can be. Again, when you’re finished, be sure to wipe off all the excess you can with a rag or paper towel. This keeps the chain relatively clean, which is just as important as keeping it lubricated.