The way it works in general is the programming source code is written in a text file with a specific extension (.py, .cpp, etc). Then a program called a compiler takes that file, translates what is written in 0s and 1s and creates a new file with a .exe extension. That is the executable file which your computer runs and which is distributed to users. So the original file with the source code is not distributed, only the executable, since this is the file which is actually the program that your computer can run.
When the source code in the original file is changed, it needs to be compiled again into a .exe file and distributed again to users. That is what updates/patches are.
Latest Answers