See the rules of chess:
http://www.chessvariants.org/d.chess/chess.html
Repetition of moves
If the same position with the same player to move is repeated three times
in the game, the player to move can claim a draw. (When the right to make
a certain castling move is lost by one of the players between positions,
then the positions are considered to be different. For the fine points of
this rule, see the official rules of chess).
Refer to section 10.10:
http://www.chessvariants.org/fidelaws.html
One case where the repetition of move occurs is when a player continues to
give check forever.