In playing Carcassonne for the iPad I've been very curious how the Elo for a player is calculated, and by what means it is adjusted at the end of a game. I have played games where I have tied with the AI at the end of the game, but the Elo distribution was different. How it is calculated?
Wikipedia has an extensive article on the Elo rating system.
Elo is used in chess rankings mostly, but can be used in lots of one-on-one or team-on-team ratings. It can also be used for other things, for instance ranking girls, as seen in the movie The Social Network,
Your ranking at the start of the match forms the basis of the expected outcome of the match. A win could be 1 point, a draw 0.5 points and a loss 0 points. If the system calculates your chance of winning as being 90%, your expected score is 0.9.
Score can be calculated after each match or after a tournament. If your expected score in a four-match tournament was 2.8 (you were among the better players in the tournament), but you only managed to score 2.5 (1 + 1 + 0,5 + 0), then you will lose ranking points.
The bigger the difference between the expected score and the actual score, the more of a rating change you will see. So if a low ranked player beats a high ranked player, he/she will gain more points than if a high ranked player beats a low ranked one.
The actual score you end up with depends on the implementation of the Elo algorithm, and especially on how the K-factor is used. See http://en.wikipedia.org/wiki/Elo_rating_system for details.