AFAIK, the GPS visualizer is only in affect if one is of the tiny fractional percentage that can afford to fly around the world to the handful of real race courses where they have suitable sensors installed.
As to literally "How does it work", I'm not sure, but I'll speculate a bit from the typically stunted description and accompanying image.
When a car is driven on these special tracks, its position, speed, etc are recorded at fixed positions along the circuit. One then saves the array of data points to a file which is then loaded to GT6 for playback at a later time.