Red line is a barrier-free path, showing where the ball should land on when there are no obstacles (e.g. stones/trees) on its flying trajectory.
The yellow line represents the real trajectory of your ball.
Take the following two cases as examples:
From the picture, you can see the yellow line shifts to the left side after hitting on the tree. The red line goes through the tree and lands ahead. In golf rival, when you shoot a ball towards the tree, the real fly trajectory will be like the yellow one.