The rule of the square is lesson 5 of 7 in Endgame 1: Basic mates and running pawns, an endgame course suited to players rated around 600 (beginners). Draw a square from the pawn to the last rank. If the defending king cannot step into it, the pawn simply runs. It has 7 interactive exercises: 7 calculated lines from real positions. You play every move on a board and get feedback straight away. The lesson is free.
What you practise
White to move and win. (4 positions)
Black to move and win. (3 positions)
Worked examples
White to move and win. 1.g4 Kg2 2.Kc5 Kf3 3.g5 Ke4 4.g6 Ke5 5.g7 Ke4 6.g8=Q. The king was outside the square of the pawn, so the pawn ran home. This is a won endgame (checked with endgame tables). After Kc5 the win would be gone.
Black to move and win. 1...f3 2.Kd4 f2 3.Kd5 f1=Q. The king was outside the square of the pawn, so the pawn ran home. This is a won endgame (checked with endgame tables). After Kb7 the win would be gone.