There is no real set way of playing sets to guarantee success. What you do really depends on what you have observed on your table up until that point... what happened in prior hands, pre-flop, post-flop betting, observations of opponent's tendencies, your position, etc.
If the villain you are up against a TAG player who bets mostly for value (and not really
bluffing that much in your estimation), and you are facing multiple re-raises on a wet board post-flop, then likelihood is that he has something stronger than high pair or even overpair and so you might need to be prepared to lay down the set.
If you are playing a LAG player, then the range of hands that could be beating his is larger and you could take your chances and calling all the way down (if OOP) or check-raise him all the way to the river (depending on what the board looks like).
If you aren't really sure what you are up against, and you haven't really been observing player tendencies... then that's probably something you'll need to address. Having a feel for a villain's style will have a big impact on whether you are willing to lay down a potentially big hand. HUDs can help you with this. If you are new to the table and haven't had a chance to figure out your competition, then you can probably take your chances and base most of your responses to the action (since that's all you have to go on).
I'll suggest that you post your hands here along with your observations of the villain and the more-than-capable members here will be able to give you some good suggestions on options on how to handle the situations in question. That's probably the best way to learn and where this community can be most helpful.