The basic idea is that the better place you get, the better it will be for your rating. It's also important how you and the other players are rated before the game starts. You will earn more for besting a high rated player and conversely lose more to a lower rated player if you finish below them.
If all players are of equal rating you will more or less go up in rating if you are in 1st or 2nd and your rating will go down if you are in 3rd or 4th. The points you receive in the game are not used in calculating your rating just what place you earned in the game. (1st, 2nd. etc.)
Since most everyone players team (partner) games you are rated as a team loss or win. If you are on the losing team you will be compared to the members of the other team as losing to each the reverse is true if your team wins. In that case you would be rated as if you won against the individuals of the other team.