By "extending jQuery" I mean the writing of a section of code in the form of a plugin that can easily be reused on many pages. As Bear said, this lets jQuery concentrate on the functionality used by most people without bloating the library with rarely used abilities. The plugins integrate with fully into the normal jQuery processing and can take advantage of its other capabilities. The benefits of creating a plugin include consistency of appearance and behaviour across your Web site and reduced maintenance as there is only a single copy of the code to
test and update.
You can extend existing plugins and override or add functionality to them - some more easily than others depending of how they are written. jQuery UI is designed to be extensible - most of its plugins extend its Widget module, or those that interact with mouse drags extend the Mouse module. You can enhance one of the jQuery UI widgets by using it as the basis for your new plugin.
Some plugins add their own internal extension points. For example, the Validation plugin lets you add new validation rules and class rules. My Calculator plugin lets you add new buttons/functions to it. However, these are isolated examples and each plugin does this its own way.
Versioning of plugins is always a problem - even just with jQuery itself. At least with jQuery and jQuery UI there is a built-in version number that you can check - $.fn.jquery and $.ui.version respectively. Most plugins don't provide this facility. Maybe this should be added to the list of best practices.