How is a Python package laid out on disk, and what does the __init__.py file do?
A package is a directory containing an __init__.py file and one or more modules inside it. A minimal package looks like this: a directory named shapes, an __init__.py file inside it, and a module such as circle.py beside that.
The __init__.py file is what makes the directory a regular package. It is executed when the package is first imported, so it is the natural place to run package-level setup and to re-export the names you want visible at the top level — writing from .circle import area in __init__.py means users can write from shapes import area rather than reaching into the submodule.
Submodules are then reached with a dotted import. Importing shapes gives you the package, and from shapes.circle import area reaches into the submodule for a single name. Importing shapes.circle binds the submodule as an attribute of the package, which is why the submodule's name is also reachable as shapes.circle afterwards.
Two details to know. Since Python 3.3 the __init__.py file is optional — a directory without it becomes an implicit namespace package, which works but cannot run code at import time, so most projects still include it. And a package is only importable if the directory containing it is on sys.path, which is why installed packages work but a folder you just created in your project directory does not until you fix the path.