In poker, setting a trap means playing a strong hand in a way that indicates weakness, with the goal of getting your opponent to commit more chips to the pot.
There are many ways to set a trap, but you need to know your opponent pretty well to know if your trap is likely to work.
For example, against aggressive players, checking when a scare card hits is usually a very good way to get them to start betting. In a situation where that action card actually helps your hand, you can set a trap by checking and letting them take over the betting lead.
Going for a trap every now and again is perfectly fine, but you shouldn’t make this a core part of your strategy in Texas Hold’em. More often than not, you’ll get the most money out of your opponents by doing the betting yourself when you have the best hand.