The object of the game is to put the opponent's king in check so securely that escape is impossible. This is called checkmate.
In the illustration below, Black coordinates a king and a knight to checkmate the white king. The black king has the white king cornered. All the white king can do is move back and forth between b1 and c1, while the black knight moves into position. When the black knight moves to c4, it puts the white king at b1 in check, and prevents the king from escaping to c1 which is also under threat by the knight. Since the king is in check and cannot escape, checkmate has been accomplished. Black wins the match.