The secret to an image stabilized lens is an internal lens element that is allowed to float off of the original optical axis. While the front and rear elements remain stationary, the internal floating lens bounces to and fro to compensate for the movements of our shaking hand. The scenario roughly unfolds as follows. Tiny gyroscopes and accelerometers detect subtle movements of the lens. They then trigger circuits which move the floating lens in equal and opposite directions to counteract the movement.
That's fun! Great video showing how it all works inside the lens. I'm sure that Canon lens is great - and I think the Pana 14-140 is just amazing when it comes to stabilization. And it saves me taking my lens apart!