See packages for an overview about using and writing Macaulay2 packages.
The object Package is a type, with ancestor classes MutableHashTable < HashTable < Thing.