This appears to be their Amphistaff.
Amphistaffs were genetically engineered serpentine creatures that served as the primary anti-personnel weapons of the Yuuzhan Vong.
They are their favored weapon. Wookieepedia explains how they are used:
If a warrior captured an amphistaff as it left its polyp, the two were bound together and the amphistaff would loyally serve its new master in battle. Hand motions from the warrior coaxed the amphistaff to either harden or become pliable, for each had its own purposes. Amphistaffs had three distinct forms: a quarterstaff, a spear, or a whip. As a hardened spear with a poisonous head, the amphistaff could be hurled, further increasing its lethality. As a flexible whip, the amphistaff could trip or pin its target and even poison it. Amphistaffs were one of the most durable objects known, as not even lightsabers could cut through them. When used as a heavy staff, the serpent would endure blow after blow from the Jedi weaponry and remain unfazed. The amphistaff's edge—measured in atoms—slashed through flesh with no resistance. In the blink of an eye, the amphistaff could soften and wind around the lightsaber's blade, its venomous jaws snapping and tearing at the unfortunate victim's face. Because of its organic nature, these creatures were capable of recovering from virtually any wounds. Nigh indestructible, an amphistaff could only be killed by repeated blunt trauma to or removal of the head.