A package is a library of related software. There are zillions of classes defined for use with Java. Packages can be used to avoid duplication of names. Duplicated names can be avoided by extending the name with a package name. The class mystuff.
Widget is distinct from yourstuff.
If the class is not public , only other classes in the same package can use it. In a new program, import the package and use the class. The package name defines a directory structure for the location of the class files. Changing the periods in a package name to slashes will produce the directory where the class files should be located. These directories can be located in a jar file.