Although dust has been a nuisance for photographers since long ago, the problem has gotten worse by the introduction of high-resolution DSLRs.
The image sensor is covered with an anti-aliasing filter which acts as a low-pass filter to minimize moiré. Unfortunately, the surface is a bit "sticky" and has a very high affinity for dust, which once it has got stuck is difficult to get rid of. To make a simple experiment, take a close look on brand-new recordable CD-R or DVD-R disc – the surface is similar. Take it out of its sleeve or spindle – it attracts dust like a magnet attracts iron powder. Sad to say, but the sensor is just like that.
Since the sensor is made up of a matrix of tiny discrete light-sensitive photodiodes, which on a typical DSLR is in the range of 5x5 to 10x10 micrometers. This in turn gives that even a very small dust particle that sticks on the sensor can create blemishes on the final image as light is blocked.
Shooting with an aperture under f5.6, dust spots are often not seen but at f8 they start to become noticeable. At f16 they’re definitely there and at f22 you’ll see them, even with a meticulously cleaned sensor.
There are several methods available for cleaning and I always try with a blower first. However, in order to get it clean enough for f8 shots with a bright blue sky, I "wet-clean" the sensor with optical grade methanol and swabs. It takes some training and nerves of steel in the beginning, but then it's easy. It just takes ten minutes or so. Usually two or three rounds is necessary.