From actual play (matchpoints, opponents not vulnerable):
You pick up a nondescript:
The auction is:
RHO you LHO pd
P P 1S P
1NT P 2D P
The 1NT was forcing. A 2S rebid by opener would show six spades. The 2D bid promises at least 3 diamonds, and almost always more diamonds than clubs.
Partner leads the Q, and dummy comes down with
You play the 4, trying to be encouraging. Declarer wins with the ace and plays A, all following.
This is one of those bidding sequences that strongly limit the possible distributions declarer might have. So at this point, you should know declarer's distribution.
Declarer then leads the 10, playing small from dummy.. Your partner shows out, as you should have expected, pitching an uninformative club. You win with your jack.
You play your king, winning, then a small heart. You partner wins with the jack.
Partner then leads the 10. Declarer wins the ace and leads the queen. Partner wins with the king and leads a small club. Your 8 of clubs wins.
The first round of trumps revealed that declarer had 3 diamonds. Declarer probably would have bid 2C with 3 clubs (that is the system bid), and declarer would have bid 2H with four hearts, and declarer would have bid 2S with 6 spades (and only 3 diamonds). That makes declarer 5-3-3-2, and partner is 3-4-1-5.
Placing the High Cards
Obviously, declarer started with two small clubs, 3 diamonds to the ace, and 3 hearts to the ace. Declarer has to have the ace of spades to open the bidding, and probably has the jack of spades to be playing spades in that way.
Now it is a double-dummy problem, albeit a relatively difficult one for the bridge table:
If you return a spade, you might get only your king and declarer is down 1.
If you lead a club, declarer has to ruff with the 10. Now you have the K8 in diamonds sitting over dummy's Q76, and you make two diamond tricks, for +100.
But, if you cash your king of diamonds, you can now cash a club trick. That is also down 2. And if your partner overtakes your queen (as he should -- he can count the hand too), he can lead his last heart. Then you make your 8 en passant. Down 3 and +150.