The position on the left arose after black's 37th move. The obvious critical feature of the position is the two sides' pawn majorities, black's on the kingside and white's on the queenside. The latter is still fully mobile and white may be able to create a passed pawn from it, but the former is blocked.
Black cannot do anything to advance the pawns without losing one of them; all he can do on that side is shuffle his king. And if white plays 38.gxf5+, then after 38...Kxf5, he can't even do that. The position on the kingside is now a mutual zugzwang - black can't move without losing the e-pawn, but white can't move without allowing the black king in.
Fortunately for white, he has some free tempo moves and can play 39.b4! to force black to give way: 39...a5 is met by 40.bxa5 bxa5 41.a4, and 39...b5 is met by 40.c5, and in both cases black has run out of waiting moves and must lose the e-pawn and the game.
Instead, white let black off the hook with 38.c5??, which completely changes the character of the position. Now after 38...bxc5 39. dxc5 Ke5 40.gxf5 Kxf5, the situation has changed. White is still in the same kingside zugzwang he was in before, but black, with the pass moves Kf5-e5-d5, is not. After 41.a3 Ke5 42.b4 Kd5 43.a4, we reach the second diagram.
Here, black played the hasty 43...Kc4? to mop up the queenside pawns. Instead, 43...Ke5! was winning. Now 44.b5 cxb5 is of no use to white, because the black king can stop the c-pawn, so he's got to try 44.Ke2, but after 44...Kd4 45.Kd2 (or 45.b5 axb5 46.axb5 Kxc5 47.bxc6 Kxc6 48.Ke3 Kd5 and black has a winning endgame) 45...Kc4 46.Ke3, we've reached the position after 43...Kc4 but with black to move, rather than white. As you will see, this would have made all the difference...
...because the game continued 43...Kc4? 44.Kxe4 Kxb4 45.Kf5, reaching the third diagram, in which black made his final mistake.
After 45...Kxa4?? 46.Kxg5 Kb3 47.h4 a5 48.h5, he realized what he'd done: the white pawn would queen first and stop him from queening. He therefore resigned. And this is why the tempo in the earlier line was crucial: had black gone into this line a tempo up, he'd have been the one queening and controlling a queening square.
Had he played 45...Kxc5 instead, he'd have had a safe draw with some winning chances: 46.Kxg5 Kb4 47.h4 c5 48.h5 c4 49.h6 c3 50.h7 c2 51.h8=Q c1=Q+ will end up with a queen and a-pawn against queen ending. Black can't lose that except by walking into a skewer, and can play for a win without risk. (There may not be a win there, but that's another story.)