If it's the barrel itself, tighten whatever nut/screws are attaching it directly to the receiver. It's different on different guns, but is usually just a nut directly around the barrel at the receiver that you have to tighten.
If it's just the handguard... not a lot you can do. They aren't very sturdy.