Digital SLR camera CCDs will become dirty over time causing spots on the photos. The rate it becomes dirty depends upon how often the lens is changed and the environment the camera is used.
How do I know if my CCD is dirty?
Set the camera to the smallest aperture like f/22 and take a picture of the sky without clouds. If you can see black dots on the picture then the CCD is dirty.
Do I have to clean my CCD to remove the dust spots?
Try updating the dust delete data on the camera by selecting the option from the camera's menu and taking a picture of the clear sky. If the black dots go away then the CCD was not very dirty and does not need to be cleaned.
If the back dots still exist try running the camera's self cleaning mode. This is normally performed when turning on or off the camera.
To minimize the effect of dust on the CCD set the aperture to the widest setting such as f/5.6 and this will make the black dots blend in the the photo more.
If there is not too many spots then they can removed by a spot removal tool in your favorite photo editing software.
Last step if the camera is too dirty to live with such as the example photo then the CCD has to be cleaned. If you never have does this yourself take it to be cleaned by a professional and have them teach you how to do the cleaning. I have been using two different type of cleaning kits. SensorKlear II for light dust and Sensor Scope by Delkin Devices for heavy cleaning. Both types work OK but there could be improvements. SensorKlear leaves dust in the corners of the CCD and is not very good for cleaning sticky dust that comes from working around water. Sensor Scope it is easy to use too much cleaning fluid leaving water spots on the CCD and the cleaning pads sometimes leaves fibers on the CDD. What has not worked and I recommend staying away from is the bulb blowers. This probably work if you are always in a very clean environment but when in the field they seem to blow more dust onto the CCD. This is what happened when I took the example picture above.