Simply said, OSGi is a dynamic module system for Java. It defines means to install, uninstall, update, start and stop modules. Those modules are called bundles, but are, in their simplest form, actually Java jar files with a special Manifest. Modules can be installed, uninstalled etc without stopping or restarting the Java VM.
An OSGi framework manages the described lifecycle of and dependencies between the bundles in a secure way. A bundle needs to state which Java packages it exports and which it imports. The import and export statements can be annotated with version information, so that you even can have more than one version of the same package in the same Java VM