Your king stands in front of the pawn, and the pawn has to reach e8. The rule: take the opposition. Put your king face to face with his, one square between them, and leave him to move. His king must step aside, and yours walks forward.