As a general rule, the player who is ahead material wants to exchange pieces while the player who is behind wants to exchange pawns.
Consider the following position in which Black has lost a knight in exchange for a pawn early in the opening.
Ideally, White would love to trade off all the pieces to reach a position like the following.
White would send his king to one side of the board and his knight to the other side of the board and the Black king would be unable to defend his pawns on both sides.
Black, on the other hand, would like to trade off pawns, followed by trading off pieces, to reach the following position.
Black is still down on material, but White cannot checkmate with a knight alone.
If Black were down by a rook, simply trading off the pawns would not be enough to draw as White could checkmate with the king and the rook, however, Black's chances of coming back are better if he does not have to worry about White queening a pawn.
Even when it is in a player's interest to trade pieces, it may not be in his interest to initiate the trade. It is always important to consider what the position is going to look like after the exchange.
QUESTION: Which of the following positions is better for White?
If you said Pos. 1, you would be correct. In both positions, White is ahead by three pawns. However, in Pos. 1, White's rook is sitting on an open file threatening to win another pawn while in Pos. 2, it sits inactively in the corner.
Pos. 2 resulted from White's decision to initiate a rook exchange with 26. Rxe8?! in Martin v. Brahmbhatt on 4th Board.
While White is happy to trade rooks with his three pawn advantage, 26. Rae1 would have left him with greater control of the position.