In Sonic and Sega All Stars Racing, one of the loading screen mentions there are "possibly other things you can do in a race to earn Sega Miles." I know you get more miles if you win races, but what other things can I do to make sure I earn as many Miles as possible?
As far as I can tell, you only get Sega Miles at the end of a race, and its tied to how well you do in the race. There's some speculation that the distance travelled is a factor as well.
People who have been trying to farm miles for some of the higher order licenses seem to think that the best way to go is to just run 1-lap races. However, I'd think that if you're just trying to have fun, it's probably just better to play it however you like.