A ruff and sluff occurs in a trump contract when a defender leads a side suit that declarer and dummy are both void in. If declarer and dummy both possess trumps, then one hand can ruff while the other hand "sluffs" (i.e. discards) a loser.
For example, assume that South plays in hearts in this 6-card ending, and West is on lead:
If West leads a spade, then the defense collects three spade tricks. However, if West leads a diamond, then South benefits from a ruff and sluff. The diamond is ruffed in one hand, and a spade sluffed from the other. South consequently loses only two spades.
A ruff and sluff can happen by:
A defensive error. The defenders fail to recognize that declarer and dummy are both void in a given suit.
An endplay by declarer. A defender is "thrown in" and forced to concede a ruff and sluff.
An intentional play by the defense for strategic purposes (rare). See: Husbands and Wives, an article that exemplifies this situation.
Coup En Passant
A trump trick scored by ruffing a card "behind" a defender who holds a higher trump.
A strategy of ruffing losers back and forth between declarer's hand and dummy.
A strategy in which declarer's long trumps are used for ruffing losers, and dummy's short trumps are used for drawing the opponents' trumps.
A finesse of an enemy card (usually an honor) by threat of a ruff.
Bridgebum began in 1999 and covers a large set of descriptions of Bidding conventions, declarer play and defense, and more.