You are right. It is not easy to understand this endgame as a beginner in chess.
I will explain it straightforward in simple words now and I am sure you will understand it quickly.
You are White
Just get this position below as White and make sure it is not your move. That's it!
1. Your pawn is BEHIND your king 2. Kings are OPPOSING each other
If Black must move you (White) win If you (White) must move it is a draw.
This is a Draw because the Pawn is BESIDE the king This position below ends in a STALEMATE, which is a draw.
You are White
Look at the following chess positions to learn what to move next as White.
Above: Get the OPPOSITION After this Black must move away from the OPPOSITION and you move your king SIDEWAYS and win!
MOVE YOUR KING SIDEWAYS This makes room for the pawn to move ahead.
Above: Get the OPPOSITION If you push the pawn forward (1.d4??) Black will get the OPPOSITION! (1...Ke7 Draw) So after 1. d4?? Black plays 1...Ke7 and gets OPPOSITiON, and then you must move your king away from the opposition and Black keeps moving into OPPOSITION all the time endlessly. Example: 1.d4?? Ke7! 2.Kd5 Kd7 3.Kc5 Kc7 and so on forever ... Remember! In this case you can't push the pawn because then the pawn would be BESIDE the king which is a draw (position ends in a stalemate).
Above: KEEP the OPPOSITION 1.d4 If you move away from the OPPOSITION then Black keeps moving into OPPOSITION endlessly. This brings nothing. Example: 1. Kc5 Kc7 2.Kd5 Kd7 2.Ke5 Ke7 etc. After 1.d4! the black king must move away from the OPPOSITION as Black must make a legal move and after that you win moving your king SIDEWAYS.
White gains control over the promotion square d8 and then pushes his pawn ahead.
Edge Pawns are a Draw
If you have an Edge pawn on the a or h-file you can't win. See below
White plays 1. Kg5 and gets the OPPOSITION, but the game will still be a draw because the king can't move sideways on the edge.