Patching
Let's assume you have modified a source file source.c and still have the original called source.c.orig. Then you can create a patch as follows:
diff -u source.c.orig source.c > /path/to/my/patch/source.patch
To apply the patch, go to the directory from where the patch was created and run:
patch -p0 </path/to/my/patch/source.patch