Two knights cannot mate alone because the final approach stalemates, but if the defender has a pawn blocked far enough back, the second knight is freed at the last moment and mate follows.
Two knights against a bare king is a draw: the mating net ends in stalemate, since the last knight move would have to be made with the king already stuck. But if the defender has a pawn, the stalemate disappears: Black must move the pawn when nothing else is available, and White's blockading knight is released to deliver mate.