A package is a collection of related Java entities such as classes, subclasses, interfaces, annotations, and enumerations. It can also contain sub-packages. Packages in Java are of two types - built-in packages and user-defined packages.