You mean a tripwire or bola? Those can and do work. Bolas are a bit of an oddity, though they are functional. Tripwires, in spite of their name, aren’t usually used to trip someone, but it can happen.
Normally, tripwires are used to activate (or trip) a trap. They’re a triggering device, not the trap itself. For example, run a bit of fishing line between two trees, then rig it against a grenade (technically this is a little more complicated than just tying it to the pin), and you’ll have an improvised mine.
Laser tripwires are similar. You send out a beam of light, then bounce it off a mirror, and check to see if that beam has been broken. If it does, you set off the alarm, lock the doors, and nuke Detroit.
Now, actually tripping over a line? It can happen. I mean, I’ve tripped over the coax cables in the apartment enough times. It will knock you off balance for a few seconds, but it’s not going to send most adults sprawling. So this is more of a trap for toddlers and the clumsy.
You’d get the most mileage out of these by suddenly springing them up in front of a running target. There are ways to do this, but it’s a very situational option.
Bolas are a pair (or more) weighted balls attached to the ends of a thin rope or chord. You throw these with the intention of it wrapping around an animal’s legs tripping them. From what I understand, they actually work pretty well. When the string connects the closer weight will continue traveling and secure itself to that leg, while the longer end will (usually) loop around another leg pulling itself tight as it wraps around. They’re an indigenous weapon of South America, and even saw battlefield use historically.
The downside is that learning the bola does take a lot of practice. They are fairly easy to build in the field, and it is a weapon that someone stranded in the wilderness could realistically fabricate.
So, they work but are difficult to use.