If a player's king is placed in check and there is no legal move that player can make to escape check, then the king is said to be checkmated, the game ends, and that player loses. Unlike other pieces, capturing the opponent's king is not allowed.
The diagram shows an example checkmate position. The white king is threatened by the black queen; the square to which the king could move is also threatened; it cannot capture the queen, because it would then be in check by the rook. This means black player wins the game.