A module is a single file containing Python code, while a package is a directory that contains multiple modules and a special __init__.py file.