For the casual rider the simplest approach is to go to a bike shop and get a bottle of "chain oil". Apply the chain oil fairly liberally (drizzle it on while cranking the chain backwards, if the bike has a freewheel), then wipe the chain with a rag (while cranking backwards). If the chain is REALLY dirty, repeat.
For slightly more aggressive cleaning (on a derailleur bike), get a "chain washer" and the associated solvent. Fill the washer and clamp it on, crank backwards for 30-60 seconds. Wipe with a rag. Apply chain oil. Wipe. If you're riding daily this is probably what you should use, every week or two.
There are the obsessive types who still remove their chains and boil them in kerosene or whatnot to clean then, but that's kind of silly (and dangerous), since chain washers have become available.
Note that chain oil comes in "wet" and "dry" varieties. "Wet" is for wet weather, and helps prevent corrosion in the wet, while "dry" is for dry weather and doesn't pick up dust nearly as fast as "wet" (and hence keeps the chain cleaner). And there are "do-all" and "in-between" varieties. Just pick what seems to fit your riding conditions best.
Do note that, even if properly lubricated, chains wear out. You should get a "chain stretch gauge" to measure the wear of your chain, and replace it when worn to about 0.8. Running a worn chain damages the sprockets.