I got a draw by repetition, how did that happen?
Draw by repetition is a kind of draw that can happen in chess due to the threefold-repetition rule. This rule is in place to prevent games from going on forever with the same moves being made over and over!
The threefold-repetition rule says that if a position arises three times in a game, either player can claim a draw during that position. On Chess.com, this draw happens automatically on the third repetition.
One thing to remember is that the repeated positions do not need to be in a row. The three positions can happen at any point in the game. If a position is repeated three times, no matter where in the game, on the third time it will be declared a draw.
Consider the below game, in which a position was repeated three times on move 51, 53 and 55:
Move 51 for black:
Move 53 for black:
Move 55 for black:
It doesn't matter that there are other moves in between, what matters is that this exact position happened three times. On the third time it is declared a draw.
Two positions are by definition "the same" if the same types of pieces occupy the same squares, the same player has the move, the remaining castling rights are the same and the possibility to capture en passant is the same. The repeated positions need not occur in succession.
Even if there were 10 different king and queen moves in between these moves it still would have ended as a draw. The only thing that matters is that this exact position was repeated 3 times in the same game. On the third time (move 55 for black) the game was automatically declared a draw.
If, for example, a pawn had been moved, or the bishop or rook moved to another square, the position would be different and the draw would not have happened.
So, pay attention to the position if you want to avoid (or cause) a draw by repetition!