This site says:
A player has to win six games, and at least two more than the foe, to claim a tennis match. Players switch sides after every odd game, as in the first, third and fifth games, and so on. Players also switch sides at the end of a set if they're playing an odd number of games.
So, you start, 1-0, and change sides. If the game ends 6-0, 6-2 or 6-4 (or an even number of games), you play the first game of the new set, change sides, and you are back to the previous rule.
But what if a player wins 6-1 or 6-3? You win the set, then change sides. Now, you play a new set, do you change again at 1-0 (therefore after having played just one game), or wait until the 1-1 or 2-0, therefore now changing after an even number of games in the second set?