In king vs pawn endings, keys squares are those squares in front of the pawn from which the stronger king can ensure promotion.
While key squares are always in front of the pawn, their exact location depends on the rank of the pawn itself. If the pawn is already on the 5th rank, then key squares are right in front of the pawn:
If the white king can occupy one of key squares before the black king can pose any danger to the pawn then promotion can be forced.
When the pawn has not reached the 5th rank, then key squares are two squares away from the pawn:
The concept is the same: if the white king can occupy one of the key squares then promotion can be forced.