A Frame Trap is when you attack to hit/block stun your opponent, then hit them with another move right after hit stun ends, so that if they try to attack in between your two moves, their move will get Counter Hit. The basic way to do a frame trap in Street Fighter is just hit your opponent with something plus on block, and then hit them with a reasonably fast followup move. Doing a plus on block move, then a followup move performed like a link will frametrap in basically every fighting game.
There's 3 basic methods of frame trapping, including the one above.
1. Hitting with a move that is plus, then following up with another move. 2. Hitting with a move that lets you cancel it late, then canceling late enough your opponent has a brief opportunity to press a button. (Only possible in Marvel vs Capcom or most Anime Fighters) 3. Canceling from a low hitstun move into a move with more startup. (like chaining light to heavy in chain games)
If you want to get technical, you can calculate how small the gap between your first and second move are to see how tight your frame trap is. If your first move is +3 and your second move has 5 startup, that's a gap of 2 frames. They would need to use a move that comes out in 2 frames to trade with you. If you're doing a cancel like in method 3, just compare the blockstun of the first move (active + recovery + block advantage) to the startup of the move you're canceling into and that's the gap. In the case of delay cancels the math can be a bit fuzzier, because you're allowed to cancel whenever you want, so the gap can be bigger or smaller depending on when you cancel.
The thing you want to avoid is a true blockstring, where your second move hits the opponent before the blockstun ends. If they don't exit blockstun, they don't have a chance to press a button. If they don't have a chance to press a button, then even if they're mashing, they'll continue blocking, and you won't get the chance to open them up.
In some circumstances, if you have a move that's faster than anything your opponent has, you can frame trap them, even when you're minus. In older versions of Guilty Gear, Sol had a 5K that came out in 2 frames. This meant he could frame trap people with it even when he was minus. In the Super Smash Bros series, most frame traps work this way, such as Samus's jab crouch canceled into forward tilt, Fox's shine pressure, Falcon's sweet spot knee into jab. Most of these are minus on block, but since their opponent is restricted to only using grab or jumping attacks immediately out of shield, they cannot use their fastest options to retaliate like in most fighting games.
Frame traps can also work based on hitting your opponent with something faster than any of their likely options. In Tekken, a common tactic is to hit the opponent with something that is only -1 or -2, then follow up with a magic 4 (A standing Right Kick that launches on counterhit, hits hight, and comes out in 10 frames, the fastest a tekken move can come out). Unless the opponent chooses to retaliate with a jab, they're likely to get caught by the magic 4, even though the attacker is at frame disadvantage. This is especially effective in Tekken, because on frame disadvantage, it's possible to sidestep their 10f jabs for a punish, and the options to catch sidesteppers are slower than 10 frames, which means they get caught by the magic 4.