Hello, I'm currently ranked 15th in my state (so says the do-fob in the top right of the menu screen and the game center ranking site, but I literally have no idea what that means

. I get that it means that I'm better than the person in 16th, but why? I have yet to find an indication as to what the rankings on these leaderboards mean. Is it by the number of medals I've earned? My times? I've noticed myself go up in ranks on both online and campaign mode.
Basically my question is: How are the leaderboards calculated, and what should I be shooting for specifically when I'm trying to gain ranks?
Thanks in Advance.