The line is kinda hard to follow, but it proveides the best average line. You may be able to get a better line by taking the turn tighter or wider, depending on the corner. Make sure you follow the color indicators though. It helps in 2 ways:
1- you learn how cars handle by the way they react to differnces in acceleration, drift, and braking while turning.
2- It makes it easier to actually pass the license test by following the games instructions.
Another tip, for beating the license tests is to watch the demo, then take the test at a slower speed so that you make it to the finish line. Even if you fail, you will end up with a ghost car to race against to help you better your times and you can better guage any mistakes you made by how much you beat your ghost by.