The counterattack is one of the most fun ways to defend. In a counterattack, you force the opponent to do something other than capture your piece.
If two pieces are attacked at the same time, you can save one piece first and then the other. For instance, you could try to give check. Your opponent has to deal with that. This gives you time to move your piece or protect it.
Study the example.
What do you have to do?
Use a counterattack to prevent material loss.