It's true that sets are typically one of the toughest hands to put someone on.
The best thing you can do to avoid stacking off with big pairs against sets (and trips, evidently), if we're talking about a game with a regular cast of players, is to know how your opponents tend to play sets and watch for those betting patterns.
For example, one of the guys in my weekly low-stakes NLHE game always checks if he flops trips with a pair on board. Always. If there's only one bet to him, he'll call and save his aggression for the turn. I've used this information on many occasions to minimize my losses against this player.
Of course, it won't always be something so specific, but you should pay attention for betting patterns that indicate a lot of strength from players who don't usually fool around. Sometimes that'll be a check-raise into multiple players, sometimes it'll be leading out into someone who's likely to raise, and sometimes it'll just be conspicuously calling another player down to let him hang himself. Try to think about what people are doing and whether their range for any given action includes a lot of hands that will beat your pocket kings or whatever.
Typically, the biggest difference you'll observe is that many players' approach to the action is dramatically different when they have one pair versus more than one pair. With one pair, typical players tend to bet to protect their hand from draws and get modest value from other one-pair hands. With bigger hands, they tend to take lines that are designed to make a big pot, if not get stacks in the middle.
Also, come to terms with the fact that sometimes you just can't get away. This is especially true with tricky opponents who take aggressive lines with a wide variety of hands. If you can't surmise whether a player has a set or top pair or a flush draw, you're just kinda stuck giving action when it's a set, but you'll make lots of money on average when it's one of the other two cases. That's just poker being poker.