Use a microfiber lens cleaning cloth.
You can be fastidious, but you need not be.
A little dust will not affect your photographs.
However, fingerprints should be removed promptly.
If there's more than dust on your lens, blow the debris off using a blower (described below), before using a cloth.
Don't use compressed air, such Dust-Off.
The propellant may spray from the can, damaging your lens.
If you see dust when looking through your viewfinder, the dust is on the focusing screen inside your camera.
The focusing screen is located above the mirror.
The dust won't affect your photographs.
Remove the lens, and use a blower (described below) to remove the dust.
Don't touch the mirror with a brush, as the silvering may be on the surface of the mirror, not below a layer of glass.
Again, don't use compressed air, as the propellant may spray from the can, damaging the mirror.
Sand and lenses don't go well together.
Take an old camera to the beach, or else be very careful.
Consider using a soft-plastic underwater camera housing.
If you notice that the same defect appears, in the same location, in every photograph, then there's dust on the sensor of your camera.
Because photons are being converted to electrons, the sensor surface becomes charged, which attracts dust.
Even if your camera has a sensor cleaning cycle, check for dust.
The cleaning cycle may not dislodge every dust particle.
To check if there's dust on the sensor, photograph the sky or a plain white wall, at the following settings.
1) Set your lens to manual focus and defocus the lens.
2) Use the A or Av exposure mode, and set the aperture to f/22.
You'll get a photograph like this:
Enlarge the photograph, and scroll back-and-forth, and up-and-down, looking for defects on the photograph.
If the dust isn't chunk-style, it will look like this faint smudge in the center:
You can increase the contrast with Photoshop Elements, or other software, to make the dust easier to see:
To clean the sensor, follow the directions of your camera manufacturer.
1) Follow the manufacturer's directions carefully to avoid damaging the sensor.
2) Use a blower, such as an ear syringe.
They're available at drug stores and supermarkets, often in the baby department.
If you prefer, you can buy a photography blower, such as the Giotto Rocket Air Blower.
3) Do not use a blower with a brush, as the bristles may damage the sensor.
4) Do not use compressed air, such as Dust Off, as the propellant may damage the sensor.
1) Make sure the camera battery is charged.
You're going to lock the mirror in its up position with shutter open.
You don't want the mirror to suddenly, due to loss of power, drop back into its normal position while you're cleaning the sensor.
2) Remove the lens.
3) Go to the menu of your camera and find Lock Up Mirror or Cleaning Function.
4) While holding the camera lens-side down (so the dust can fall out), blow air onto the interior of the camera.
Be sure not to jab anything inside the camera.
5) Exit the Lock Up Mirror or Cleaning function.
Re-check the camera for dust as described above.
If a blower can't remove the dust, follow the camera manufacturer's recommendations.
The recommendation may include use of the products below.
Before using the advice in the tutorials below, do the following.
1) Read the recommendations of your camera manufacturer.
2) Evaluate the credentials of the tutorial author.
3) Check the date of the tutorial, as cleaning advice and technology is evolving.
Cleaning your Sensor Thom Hogan
The Pixel Sweeper Petteri Sulonen
Understanding Digital SLR Sensor Cleaning Luminous Landscape