When a player cannot make a legal move but is not in check, a stalemate exists. The match has ended in a draw. Neither player wins and neither loses.
In this illustration, the black rook moves from a8 to a4. White is not in check, but cannot legally move either of its pieces. The white pawn is blocked by the black king and black knight. The white king cannot capture the rook because it is protected by the black knight. All of hexes within the white king's reach are under threat by Black's king, rook and/or knight. This match has ended in stalemate.