For example, the New York Fed's 1998 congressional testimony gives the following case. You see that the yield spread of corporate bonds over Treasuries is wider than its past level, so you buy the corporate bonds and sell Treasuries. If the gap narrows, you profit; if it widens, you lose. If you have enlarged the position by borrowing, the loss when the gap widens is also larger.
The report of the U.S. President's Working Group on Financial Markets says the strategy is also called convergence trading, or relative value arbitrage. In some trades the reasons to expect the gap to narrow are strong, while others come closer to speculation.