When the flash fires (Diagram 1), light is reflected off the dust, back into the camera lens, causing the dust to be illuminated. Because of the angle of the flash and the camera lens, the closer the flash is to the lens, the more prone it will be to dust orbs. The same applies for using nightshot video cameras, the IR light reflects off the out-of-focus dust, causing them to look like "orbs" or plasmoids.
I want to emphasize the fact that orb-causing dust is floating in the air in front of the camera lens, and is not actually on the lens itself. It seems that many people think that wiping their lens clean before each photo session will solve the dust-orb problem, but this is entirely false. The truth is the dust is in the air, floating close to the camera lens (within about 6 inches normally), and there is no way to solve the problem through lens or site cleaning.
Orbs of a rectangular or octagonal shape are caused because of a phenomena that can be defined as:
"When an object with a similar shape as the aperture of the camera lens is brought out-of-focus, the object will begin to take the shape of the aperture".
In other words, if the aperture of the camera is an octagon (the aperture is the hole that opens to let light through the lens), an out-of-focus dust orb will begin to take the shape of an octagon, particularly towards the center of the image. Another common phenomena that is often mistaken for something paranormal is called lens "Flare", and occurs when a bright light source (most often the Sun) reflects off a portion of the lens, and creates "ghost" images (not really ghosts, but internal reflections) of the aperture of the camera. Generally, flare can be ruled out of most photos taken at night, but can be a problem with shooting pictures during the day.
There is nothing paranormal about the dust orb phenomena, it is natural to any camera with a flash and any video with a light source that isn't in front of the camera (ie, infrared light, spotlights). It seems that many groups still consider dust orb photos to be paranormal, because they don't want to take the time to collect REAL anomalous data. What keeps these groups holding on to the dust orb as phenomena is the instant gratification they get by collecting hundreds of so-called "spirit orbs" in a single night of investigating.
The truth is no matter what the environment, there are always air-born particles in the air (except in a vacuum...) that can contaminate your data. You can sometimes even see the flash reflect off the dust particles when a picture is taken. Also, this phenomena isn't just limited to dust, it also applies to rain, water droplets, bugs, etc.