White wins this ending by getting the opposition, and maintaining it.

  1. Kf5

Strong, but obviously forced, as his Pawn was in danger.

The Kings face each other with one square between them. White has the opposition, since his opponent must give ground by retreating or stepping to one side.

  1. ...    Kf8
  2. Kf6!

Best, since it maintains the opposition. White must resist the temptation to move closer to the Pawn. This would be the consequence: 2. Ke6, Ke8 3. d7+, Kd8 4. Kd6, and Black draws by stalemate. Note in this and similar positions that the Pawn must reach the seventh rank without checking in order to win.

  1. ...     Ke8
  2. Ke6 Kd8
  3. d7    Kc7
  4. Ke7

White wins.