Packages in Java help organize code by providing a layer of encapsulation and control. Packages group related classes and interfaces together, and allow classes to be made private to a package. To define a package, use the package statement at the top of a file with the package name. Multiple files can belong to the same package. Packages are hierarchical, with names separated by periods. Directories mirror package hierarchies.