Occasionally chess games do not end with a winner, but with a draw.
There are 5 reasons why a chess game may end in a draw:
1- The position reaches a STALEMATE where it is one player's turn to move, but his King is NOT in check and yet he does not have another legal move (PAT).
In the following example "BLACK PLAYS", but the King may not land on any of the adjacent squares because it is not allowed for him to move himself into "check", nor capture the white Rook which is defended by its King.
2- The players may simply agree to a draw and stop playing.
3- There are not enough pieces on the chessboard to force a "CHECKMATE" (For example: a King and a Bishop vs. a King).
4- A player declares a draw if the same exact position is repeated three times (though not necessarily three times in a row).
5- Fifty consecutive moves have been played where neither player has moved a pawn or captured a piece.
Some Codes used in Chess.
Ajedrez - Chess