Trapped Pieces
A piece is trapped when it has no square to move to that doesn't immediately lose it -- either every available square is directly attacked, or the piece simply has no legal moves at all (a knight boxed into a corner by its own side's pieces and the board edge is the classic case). Unlike a hanging piece, a trapped piece isn't necessarily under attack THIS move -- but its lack of an escape route means the opponent can simply bring an attacker over at their leisure and win it for free.
Corners and edges are where pieces get trapped most often, especially knights and bishops: a knight on the rim genuinely does have fewer squares available to it ("a knight on the rim is dim" is old chess wisdom for exactly this reason), and a bishop can get boxed in by a wall of its own pawns with no diagonal left to run down.
When you spot an enemy piece that looks stranded, don't rush to capture it if it's not attacked yet -- check whether you can simply cut off its last escape square first, then come collect it at full value later.
Worked examples
Trapped knight in the corner
White's knight on a8 has no safe square to move to anywhere on the board -- trapped.
Trapped rook boxed in by its own king
Black's rook on a8 has no safe square to run to -- its own king on e8 and the edge of the board box it in.
Test yourself
Click the trapped piece.