Dependency

So pretty much anything can be package. Packages preferably contain information that Composer can read and process. That information can include which other packages at which versions are required as dependencies.

In WordPress world Composer package can be:

WordPress core itself

extension (plugin or theme)

whole site (with core, themes, and plugins as dependencies)

It also opens up a way to depend on (and share) generic PHP libraries, without embedding their sources.

There is also special kind of platform package dependency. It allows to depend on specific PHP version and extensions.

Manager

Packages are not of much use somewhere out there. That is why from a starting point (“root” package) Composer will: