A knight alone cannot mate a bare king, but this king is stuck in the corner, and his own pawns can block his last squares. The rule: take away the king's free squares, and let his pawns fill the rest.