Essentially as St.Hubbins says.
Without GPxPatch, GP3 uses the original magic data in the GP3.exe file for each track slot, no matter what tracks may be in any track slot, and ignores any magic data that may be in any track dat files.
With GPxPatch, the game uses the magic data in the individual track dat files listed in GPxTrack rather than the magic data in the GP3.exe file.
Roberto Scandura wrote a fairly detailed explanation of magic data files that he made available for download somewhere (most likely on his website).
The important thing to know to keep tracks from crashing when using them with GPxPatch, is that the track dat files must contain magic data, and that the "Bump Table" (found at the very bottom of the magic data file) must contain at least as many track sections as the track that it is being used for does.