The term patch file is used for two different file types. The term patch file is sometimes used to refer to archive files that allow you to upgrade from one Joomla! version to another (for example, from version 1.0.0 to version 1.0.7). These upgrade files are also referred to as upgrade packages.
The other meaning for a patch file is a file created by source code version control software -- for example, Subversion or SVN, which is used for the Joomla! source code. This type of patch file contains instructions for changing the contents of one or more source code files. The SVN software reads the patch file and then can automatically change the source code of the files being patched.
Patch files are used by the Bug Squad to test proposed bug fixes. They can also be used to contribute proposed new features to the version under development.
For more information about the structure of SVN patch files, read Learn more about patch files.