Ratings are based on score margins (4-0 has a margin of four, 6-5 a margin of one). The rating system is Bayesian, based on the expected outcome of each of your games. Taking into account who you played with and who you played against, the system has an expectation of your performance. Beating the system's expectation of you increases your rating.