The principle is similar to mechanical stabilization , with the difference that the movement does not take place on the sensor but inside the lens. Therefore, the image coming to the sensor is already still, just like you see it in the viewfinder.
It is often necessary to set slower shutter speeds in low light conditions so that images are not too dark. However, this carries the risk of blurry images because the camera can not be kept completely still without a tripod. However, the Image Stabilizer compensates for the hand-shake so even at slow shutter speeds (e.g. 1/30) images are still sharp.
Optical stabilization can be used in all light conditions, but only when capturing a still scene. In that case, stabilization allows you to shoot at up to 3 times slower exposure than without stabilization.
If we want to shoot a moving scene, stabilization doesn't have any effect. This is because the stabilizer moves the system inside the lens to balance the movement of the photographer's hands. A fast-moving scene is best captured with a fast shutter speed combined with a low aperture lens.