I will tell you a easy method to learn these positions. Endgames are totally different than the openings and middle games. From the examples of these positions you can learn the necessary of zigzag moves.
In these type of positions just remember whoever King is ahead of their pawn, gains advantage.
ex: white king on f6 is ahead of his pawn on d5, white gets advantage to capture the pawn.
Whtie to play:
1.Ke7!! (1.Ke6?? Kc5 white is in zugzwang now 2.Kf5 Kxd5 black wins) Kc7 2.Ke6 Kc8 3.Kxd6 white wins (King on 6th rank ahead of his pawn)
Here you can see that the white king moves in zigzag method i.e, Ke7-Ke6 (first attacks the enemy pawn and next defended his own pawn)