A rook placed on the rank in front of the enemy king stops the king from escorting its pawn forward. The pawn must then walk alone, and the rook side wins it.
White's rook on h4 does something subtle: it cuts the black king off along the fourth rank. The king on d5 may not step to d4, c4 or e4, so the pawn has to advance without its escort. A lone pawn against king and rook is doomed as long as White's king gets back in time.