Unlike point-and-shoot digital cameras, in which a lens is permanently fixed to the camera, digital SLR cameras have lenses that are interchangeable. Small particles of dust enter into the camera body at the time of changing lenses, and eventually some of it will get deposited on the surface of the sensor. Since sensors tend to have some static charge, they tend to attract dust onto them, which multiplies the problem.
A DSLR sensor usually remains dust free as long as you have just one lens always mounted on it. But the more you change lenses, more likely you will find dust on the sensor. Also, because of the static charge on the sensor, once the dust gets deposited, it stays there stubbornly.