Piece trapping occurs when a piece overextends into enemy territory and the opponent methodically cuts off all escape routes. Bishops are particularly vulnerable to trapping because they can only move along diagonals, so advancing pawns can restrict them to a shrinking number of squares.
Classic examples include trapping the bishop that captures the b2-pawn (Bb2 trap in many openings), where the queen or rook seals the escape diagonal. Knights on the rim are also frequently trapped because edge squares offer fewer escape routes. The saying "a knight on the rim is dim" reflects this vulnerability.
To avoid having your pieces trapped, always consider retreat routes before advancing into the opponent's territory. When trying to trap an opponent's piece, look for ways to control key escape squares with pawns, which are the most economical piece for restricting an enemy's movement.