When you attack an enemy piece or pawn, the opponent will try to defend it. If you can remove the defender, your attack will succeed and you can win material.
Example 1: White is attacking Ne5 which is protected by f6 pawn. White to play and win
Example 1: White is attacking Ne5 which is protected by f6 pawn. White to play and win
1. h4xg5 Ne5-d3 2. Bb2xf6 winning 2 pawns.
-------------------------------------------------------------------------------
Example 2: White is attacking the Nf6 which is defended by g7 pawn. White to play and win.
1. Rg3xg7! Qe7xg7 2. Bb2xf6 Qg7-h7 3. Bf6xh8 winning a pawn.
-------------------------------------------------------------------------------
Example 3: White is attacking Nc4 which is defended by Qf7. White to play and win.
1. Qh3-h8+ Qf7-g8 2. Qh8xg8+ Kf8xg8 3. Ne3xc4 winning a piece
-------------------------------------------------------------------------------
All the above examples are from Chessguru.
Learn more positions on my Lichess study page
More examples are at Chesscorner, Chess.com, Chessfox, Chessgames
Play through the Video below