Most makers have developed their own proprietary anti-shake system, and Nikon's is called VR, or Vibration Reduction. Any camera movement during the exposure is detected by the mechanism and cancelled out with small, rapid movements of optical elements within the lens. It makes it possible to get sharp shots at shutter speeds 2-4 times slower than normal.
This is a cutaway diagram of the VR system in one of Nikon's SLR lenses. In its smaller compact CoolPix models, the VR may be built into the sensor mount instead.