How to achieve an always clean chain My chain and cogs always look very dirty as the oil attracts dirt. It is a constant problem as you can't fully avoid stains on your trousers and hands. Also, that looks ugly and I believe it wears the chain and the cassette out as the particles stuck on chain act as abrasive.

I used to think that was unavoidable, but then I noticed that on some bikes the chain and cogs are shiny clean. Is that because their owners clean the chain daily (because honestly one day is enough for a chain to turn black after full cleaning) or because they use different lubrication solutions?

I heard about teflon-based lubricants, are they really much better in that sense than traditional oil-based ones? Also, these bikes with shiny chains were always single-speed bikes - does that mean geared system experience more traction and should be traditionally oiled?
There's lots of good info here, let me summarize my cleaning routine which combines many of the approaches already mentioned, and keeps the chain in good condition and appearance.  This focuses on getting the chain totally clean and dry (no water, degreaser, or lube) before re-oiling it; and then on removing as much excess oil as possible.  The end goal is a very clean chain with just enough oil--excess oil will quickly attracts grime.

Cleaning:


First the chain gets a wipe-down with a damp rag to remove as much sand and grime as possible.  This is just to knock the worst of it off the chain.
Second the chain gets two passes with degreaser. I use the Park Tool Chain Gang cleaner which zenbike recommended for this.  It gets filled with degreaser, and gets about 30x cranks on the pedals; then a fresh batch of degreaser goes in and it gets another 30x cranks.  At this point the chain should be quite clean except for the degreaser.
Third the chain gets washed in 91% rubbing alcohol--this is primarily to wash off the degreaser, but it also gets the last of the grime.  Sometimes this takes two rounds--the last round of alcohol should remain quite clean.
Fourth the chain is left to dry for ~5-10 minutes (just long enough for the alcohol to evaporate off).  At this point the chain should be totally clean and dry with no degreaser left anywhere on the drivetrain--move quickly onto re-oiling, as a dry chain is vulnerable to corrosion.


Lubricating:


First the new oil goes on,  1x drop per chain roller.  After applying I let it sit for a couple minutes without turning the cranks to let the oil seep into the internals.
Second I spend a few minutes slowly running the chain through a clean rag to remove most of the excess--maybe a couple-minutes worth.
Third I let the bike sit for a few minutes, then wipe the chain again, and repeat a couple times.  The oil inside the links will slowly seep out of the next day or so--so this step is just to remove that excess oil as it appears.
Finally I give the chain a wipe before and after the first couple rides.  Again just to remove the excess oil as it seeps from the internals.


I usually do this routine every 100-250 miles, depending on how fast the chain grimes up.  The goal is to have a very light layer of oil over the externals of the chain, and as much oil internally as it will accept.  If you notice the chain is staying too dry, but not dirty, then you can re-oil without cleaning and repeat the process of cleaning off the excess.