how do I checkmate with king


Well, since a king can't give check to another king, it must mean the king moves out of the way, exposing check coming from another piece.

As above, it'll be moving the King to reveal a checkmate.
Here's the classic example from Edward Lasker vs George Alan Thomas, 1912. The winning move in this game was "Kd2#".
https://www.chess.com/blog/SamCopeland/lasker-vs-thomas-the-perfect-king-hunt-every-move-explained-for-chess-beginners