it is really complicated, there are alot of formulas and stuff like that.
point system
But basically if you beat someone your rating goes up and if you lose your rating goes down. If you win, the higher the rating of the person you beat the higher your rating goes up. And if you lose, the lower the rating of the person you lost to the more your rating goes down.
For more information on the rating system used at Chess.com please take a look at http://www.chess.com/article/view/chess-ratings---how-they-work
anyone know how the ranking point system in Live Chess works?