It is a fundamental principle of defense to assume that every contract can be defeated. This might be impossible in many deals because declarer has you completely outgunned, but quite often the declarer’s advantage is marginal, and the outcome depends on how well each side deploys its forces.
Assume you’re East defending against four spades in today’s hand. West leads the heart deuce, which dummy wins with the ace. You make a mental note that your partner is not leading from a doubleton (in which case he would lead his higher card), and on the basis of the bidding, it seems likely that declarer is the one with the singleton heart. Consequently, your side will not score any heart tricks.
This will not be difficult to do if your partner has three or four diamonds to the queen. In that case, all you’d have to do is play the A-K and another diamond and let your partner take the setting trick.
However, you should also allow for the possibility that partner might have the jack of diamonds instead of the queen. In that case, there is still a chance to stop the contract, but you would destroy it if you first cashed the A-K.
The play that offers by far the best prospect is to return the two of diamonds after taking the king of clubs.
South then would have to consider the possibility that you started with the A-J-2 or K-J-2 of diamonds rather than the A-K-2, and might elect to play low from his hand rather than put up the queen. If he does that, of course, he goes down one. The low diamond return therefore offers the best chance to beat the contract.