How do you take your opponent's weapon in combat? I couldn't find rules about it in the books. There is a chapter about "knocking a weapon away", but this isn't what I want. I want to grab the weapon and take it from my oppenent's hand. What rules do you use/suggest for this kind of situation?
This can only be done with an unarmed attack (which may mean an off hand if you're doing this while otherwise armed), by grabbing the weapon directly and attempting to wrench it away from them. The procedure is short and detailed on B370 under "Grabbing": a called shot that, if successful, is followed by a ST contest. The defender defends normally, for which the procedures on B400–1 for defending against a disarm are a useful reference.
Being unarmed combat against an armed foe, it's obviously rather dangerous and you should either take appropriate precautions (either during combat, or when creating the character), or only attempt this in a Cinematic game.
B370 details how to attempt to take a weapon, but here are a few extra options to help fill that answer out.
"Disarming" is a hard technique on MA70 which allows you to use your underlying skill (in this case, unarmed.) Many of the disarming martial arts in this book have disarming paired with Judo.
"Hand Clap Parry" is a hard technique that allows you to disarm with a Parry attack, which is awesome.
If you really want to get crazy in GURPS 4e with this, I'm going to toot my own horn a tetch: GURPS Martial Arts: Technical Grappling has you covered, mostly starting on p. 13.
You can grab the foe, by stepping into Close Combat with him and attacking the weapon hand at -4, or his arm at -2 (I'll have to reread my own rules to figure out why this grab isn't at -2/-1, halved for grappling like usual; it might be a special case).
You can grab the weapon itself (watch out for sharp bits!). You use the penalties on p. B400 (Striking at Weapons). You have to be able to step into close combat with the weapon itself to do this.
TG replaces the usual Regular Contest described in the Basic Set with a series of attacks based on one of the core concepts introduced in the book: Control Points. Eventually you might reduce your foe's grip ST to zero, then the weapon is dropped or yours. You can also beat on your foe's hand, which has the same effect (injury and shock counts as temporary CP for the sake of disarming in this case).
Finally, there are two methods of Instant Disarm mentioned. The usual for Knocking a Weapon Away, plus another fun one: using an Arm or Hand Lock, or Disarming, vs his Retain Weapon (ST-based if desired).
Anyway, many ways to deal with this detailed in that book.