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, Black moves the knight from e7 to f4. White is not in check, but cannot legally move any of its pieces. The white pawn is blocked by the black pawns at h4 and i3. The white bishop at e1 is blocking check by the black rook at g3 and cannot be moved. All three of the hexes within the white king's reach (h3, g2 and h1) are under threat, either by Black's pawn at i3, rook at g3, or knight at f4. This match has ended in stalemate.