We periodically get the official stats as published by the game developers. The stats for each game are then processed according to the rules of the tournament. For example, you might get 20 points for a win, then 5 points for each kill, a small amount for each minion you kill, bonuses for fast match completion, etc. These rules are different for various types of tournaments, as well as across different games. This all gets added up and scaled by rank multipliers if any. Then your best three games by the score are averaged together to produce your final score.
More details on how your score is calculated can be found below