Depending on the website and its implementation.
This is quite a common effect installed in many picture galleries, especially in online shops and catalogs.
In the case of CMSs, there are many plug-ins and extensions to put it in practice.
Anyway and to the point, if you want exactly the same extension used in eBay in your site, you are looking for Magic Zoom from Magic Toolbox.
Have a look at it here: http://www.magictoolbox.com/magiczoom/
Just 29 quids.
Many other extensions from the same company in this URL: http://www.magictoolbox.com/magiczoomplus/integration/