I wrote long ago about DSLR’s “dirty little secret”, dust on the sensor. Back in the film days and dust on the film plane generally stuck on the film and “ruined” just a single image. However in a digital camera dust on the sensor just sits there and leads to blemishes on frame after frame. Dust tends not to be a problem in compact cameras and cameraphones because they are sealed, but an SLR that takes different lens has a mechanical mirror that simply sits in front of the sensor and when the the lens is being changed the internal parts of the camera including the sensor behind the mirror are effetely open to the environment. Dust or fine sand particles, even insects can easily find their way to the sensor and because the sensor is frequently charged up and discharges as it records images and small statically charged particles are frequently attracted and stick to the sensor. So first rule is obviously not change lenses in a sand storm, or even a breezy day, or at least be careful. I take my cameras into a lots of hostile environments and I’m convinced with care and cleanliness in handling you will be fine but dust can suddenly turn up at the least expected times. Sometimes it is very obvious, like the dark shadow on the image below, and sometimes it is more subtle, like the fainter shadow on the left.
Some Cameras, like my Pentax which took the above photo, have special mechanisms that shake the mirror and this can be set to be operated manually or automatically at start up. Others like my canon have a feature that lets you photograph a plain white, or near white background, then detects dust marks and gives you the opportunity to remove then from the image beginning captured. Nice enough features but still think that being able to manually cleans the sensor is the best option. [I must add a disclaimer here that may just be an urban myth, or worse a ranson-ware style fear campaign. There are lots of posts on camera and photographic sites that warn that manual cleaning a sensor may void a camera’s warranty. So check you cameras manual before you fork out a lot on having your camera “cleaned”] The procedure is pretty safe but requires the camera having a set up feature that will lift the mirror (both the Pentax and the canon have this feature). It is important that this next step is performed carefully, you simply need to use a gentle air stream to blow over the face of the sensor and carefully blow off the small particles. The sooner you get the dust of the easier it will be shift. Never use a brush or cloth on the surface of the sensor, Just a few simple puffs that direct a gentle airflow over the sensor is generally all that is needed. I have an old style lens blower brush and I simply remove the brush and use the blower by itself. but you can buy special compressed gas sprayers specially designed to clean cameras and lens if you want to spend a little extra. If you camera can be cleaned in this way you should find sufficient detail of the best procedure to do it in your camera manual.
I also posted earlier that the best way to check for dust on the sensor is just to take a few pictures of a clear blue sky, I still think this is a superior method than taking a picture of an evenly illuminated light surface, as recommended in many photographic websites and books, because the subtle small dust shadows are much harder to see. Sometimes the dust can be on the lens (or within the lens elements) but this produces a much more defuse shadow and frequently has give away lens flares associated with them. External dust on lens can be removed with the same gently blower methods but internal dust and dirt within the lens does require skilled specialist cleaning
Even when there is a horrible big shadow on you best ever digital photo, all is not lost. There are lots of tools around to “retouch” blotches and spot that are perfect to remove these blemishes. If you software doesn’t specifically mention dust look for a clone tool. These usually have two small circular zones, the first read whatever is with the circle and the pastes it over in the second circle So all you need to do is locate the first circle over and un-blemished bit of photo close to the dust particle that has the same colour, tone & texture and then position the second circle over the dust spot, click the mouse and the blemish is gone The catch is they are usually often very manual tasks and take some time to do well. So its much better to keep your sensor clean.