As has been said before, you get badges for beating rivals, mastering tracks and completing events.
Beat a rival - 9 badges
Mastering tracks - 136 badges
Completing events - 67 badges
So you see, to get the achievement, you only need less than half of all the possible badges (the total number is 212)
The easiest is probably MASTERING TRACKS, because you can play without opponents. Just start a custom race with no opponents, three or so laps should be enough to get 100% racing line and all the corners.
It also helps to turn the assists on, because they will help you to master corners.
You can check how many badges (and WHICH ONES) you have in Autolog - Profile.
Hope this helps.