Uses the rook to keep the enemy king away from the pawn.
In rook and pawn against rook endings, if the defending king gets in front of the pawn it is usually a draw. The way to win is to cut the enemy king off along a file with your rook and keep it away from the pawn.
The black king on g5 wants to run in front of the pawn. Cut it off with your rook. Careful: keeping the king two files away from the pawn wins; one file is not enough.