Generally a patch – is a file containing source code differences. In a patch you can specify which line in which file should be added, updated or deleted. The structure of such file is standardized – that means if you create a patch file in Windows you can easily implement it on Linux.
Let’s imagine you have a project you work on. You have a production server and a development workstation. Before starting your work you copied the production source code to the workstation and initiated a Git repo there. After you finish updating you need to apply updates on the production server.
How can you do that? The easiest way is to create a patch.