You might come into positions where you have a rook versus a pawn in the endgame. In these positions you should move your king closer to the pawn to stop it together with your rook. King and rook must work together.
See the following position where you are White have to stop the black pawn from promoting into a queen. It can be done and White will eventually win the pawn and after that give checkmate with the rook the usual way. The white king must move closer to the pawn in such a way that the black king cannot hinder him.