Everything in the universe gets dirty. The Earth itself, in fact, collects tons of space dust with its gravitational field each day. This, unfortunately, includes your delicate electronic toys.

Also, it is a little known law of physics that your cellular phone, pager, handheld radio, or CD player is more highly influenced by the Earth's gravitational pull when over a body of water. Additionally, the gravitational pull exerted by the mass of your device is 10^6 times as strong upon a liquid in a container above or nearby.

The easiest kind of grunge to remove is simple dust and lint. Ideally, you will have an environment where there are no airborne smoke, oil, or other sticky substances. In this case, you can simply wipe flat surfaces with a damp cloth, brush away dust with a soft brush, or use a canned air duster to remove particles from convoluted surfaces and fans (do this outdoors, as contrary to the opinion of some, canned air does not make stuff go away, it merely redistributes it!)

For sticky stuff, such as electrical tape goo, on the outer chassis of a device, I highly recommend Goo Gone. It removes sticker gunk, among other things, and does not damage plastics.

On most things, you will never have to clean inside the chassis unless it uses forced-air cooling, as your computer probably does.

If a computer or other device is full of dust, just take it outside and hit it with a compressed gas duster. Do not use an air compressor; these tend to spit up oil from their mechanical bowels. When using a compressed gas duster, do not tip the cylinder or the propellant will be discharged. This stuff can permanently discolor plastics, including that of compact discs. (Doesn't seem to keep them from reading, though.) If (when) you get chewing gum on your shoes, this cloud of extremely cold mist can be used to your advantage; shoot the gum with it, and chip it off.

If the dust does not come off, it's glued down with oil, grease, or smoke. Cleaning this goo off is best accomplished with a liquid cleaner. My weapon of choice on this is CRC brand QD Electronics Cleaner. It gleefully dissolves grease, oil, flux, and smoke goo, then evaporates with no residue. QD can also be used to flush away water and other substances. This comes in quite handy for washing off foreign substances which get in as a result of...

Drowning!

This is the big one, which claims the life of many devices, and is often reversible through the proper steps.

The first thing you want to do if your device is hit by a liquid spill is to disconnect all power. Unplug AC power cords (at the WALL! No electrocution, please!) and remove every battery you can get to. If there is any unsaved data in volatile or battery-backed RAM, it's destined for the great bit bucket in the sky. Sorry. Consider it a sacrifice to the great digital gods in return for allowing us the assistance of the devices that make our lives easier and more fun. Save frequently. Leaving any power source on, even a small backup battery, can cause damage. On a battery pack, look to see if it can be easily opened. If it is, open it up if it got doused, and dry it out in preparation for cleaning.

Now, take a look at the substance you've just doused the device in. If it's clear, fresh water, as you would get out of the tap anywhere but Miami, FL, the cleanup will probably be easy; just open it up and let it dry. If it's something else, such as salt water, pool water, nasty puddle water, juice, soda, etc; wash it out with water as soon as possible. Do NOT allow the stuff to dry inside. Ideally, you should use distilled water, but if you don't have some handy, tap water will do.

Now you should have something wet and clean in your hands. If it tries to claw you to death, it's probably your cat, in which case, you're reading the wrong document. Otherwise, proceed to the next step.

Does the device contain any paper-coned speakers? If they got soaked, plan to replace them. Small condenser mic elements are usually protected by the little hydrophobic black mat glued to the front. Look for any burned or corroded components. If there's a backup battery on the circuit board, inspect for battery fungus and check the voltage if it's not a rechargeable.

Now rinse away the water with alcohol or something like QD Electronics Cleaner. The reason you're doing this is that you don't want mineral deposits (like those that build up in your shower). If you used distilled water, just rinse with it again and go on to the drying.

Remove any stray water or alcohol with a paper towel, then let the device dry with all covers removed for a while. This may take anywhere from overnight to several days. Don't rush this, or you'll fry the poor thing when you reapply power!

Finally, once everything is dry, reassemble it and check to see whether it's functional. Reinstall batteries, checking to see if any lithium coin cells or other batteries need to be replaced. Don't reinstall any that leak.

I've saved quite a few devices this way, including a cell phone that rode the porcelain horse, a tape recorder that fell in a tall glass of godawful iced coffee, and a digital voice recorder that decided it liked Diet Pepsi.