They don't write over source code, because first, it's very unlikely that you have the source code for a program, and second, a program is never run directly from the source code. The source code is the text you write, in e.g. C++ or Visual Basic, and is very seldom sent along with the program. You only have the compiled version of it.
In windows, most larger programs are made up of one .exe-file and many .dll-files, which each contain certain functions for the program. The .exe-file is usually used to coordinate these functions and contains the basic features, and .dll-files can e.g. contain graphic accelerators or multiplayer functions.
The main reasons for separating the functions of the program into many different .dll-files is that you can reuse the functions in many different programs, e.g. MS Office apps share several .dll-files, and that when updating the functions/program, you only have to update the files containing the updated functions.
I'm not 100% on all of the above, but if needed someone will probably correct me, but I suspect a patch writes over the files that have been changed with the new files, and also maybe change some settings for the program.
