How to use patches to transform content in the original version

I looked at the documentation and saw incremental patching, but if I wanted to change the source or code of the original version, how could I change it by patching?