That's the
BEST LINE, there's always a best line in racing on the track where you can use to get around the corners with minimum of time spent and not sacrificing a lot of speed... so if you can follow that line combined with good speed and control you can set really good lap times!
personally I don't like play while having it ON, but in SHIFT, in some races to acquire stars you need to have 75% accuracy with the line.. so I keep it ON.
Oh! and the color changes are according to your speed, if your green arrow turns RED which means you gotta hit the break hard, YELLOW is a slight tap on the break (need to slow down, but not dramatically) GREEN is to give full throttle! So you can see in the video when a bend is near the arrows change color!