It depends on the position of the pawn. The method is to block the pawn with a Knight and then drive the Black King to a corner. The blocking Knight then joins and mates the King witch cannot be stalemate because of the Black Pawn (this is the difference from the drawn endgame with only two Knights).
Two Knights vs. One Pawn

Nope, that is possible (the King and Knights are very stong). By corner I here mean e.g. g8 and h8. But maybe you will not have time for the blocking Knight to join the fun because the Black Pawn will Queen first.

Sometimes it's possible for the 2 Ns to mate, sometimes it's not, depending on how advanced the P is. This blog explains it: Knightmare: The tale of two knights checkmate.
How would Chess.Com deal with flagging here? Win for white? (I mean, in these situations, you could simply have some tablebases - if the mate is forcable in 50 moves then win, otherwise draw)
Looks like Maghsoodloo was just able to complete this mate. Agadmator put out a video on it here.
If interested, I put together a short blog with many other example games a while back: https://www.chess.com/blog/LeeEuler/2-knights-vs-pawn-mate
Would love to get this finish in a game someday. Actually did get the position in a recent rapid game (after giving away a big advantage out of the opening, and an all around blunderfest), but only had 30 seconds left on the clock and had to settle for a draw. Not that I'm confident I would have been able to finish it off with all the time in the world, but still...

https://en.wikipedia.org/wiki/Two_knights_endgame
Win or draw is decided by the Troitsky line.yes right
Hi, I am Regis (a.k.a. dennis9989, which Dennis is my dad) and today I want to discuss the Two Knights vs. One Pawn endgame, like this: