"The Elo rating system is a method for calculating the relative skill levels of players in competitor-versus-competitor games such as chess" (Wikipedia)
In the Elo system, you start at some arbitrary level. For every game played, you either gain or lose rating points. You gain if you win a game and lose if you lose. The amount you gain or lose depends on your own rating, your opponent's rating and how many games you have played.