Before I say anything, I will assume you know that having usable or exposed threads (or a flash hider/suppressor) on the muzzle of a post ban rifle that also has a pistol grip OR bayonet lug OR folding stock is a felony. Having said that, typically, most manufacturers will attach a muzzle by threading the barrel (if it is not already threaded), then drilling a small hole which enters into the barrel just enought to insert a pin which stops the muzzle device from rotating, and effectively pins it in place. They will then weld over the pin to permanently attach it, then reblue or parkerize it. If this is done well, you wont be able to see the weld. It can be done TDC, BDC or on both sides. I have seen both, with one or two pins. this is called a "blind pin" because you can't see it. Sometimes you can see where it was welded if you look closely. A blind pinned muzzle device can be removed without damaging the barrel and threads, if extreme caution is used, but there is always the risk of permanently damaging the barrel. Sometimes a threaded pin or small diameter machine screw is used, then the head ground off flush before welding.
One procedure for removing a blind pin is as follows:
1. protect any exposed barrel close to the muzzle device with heavy duct tape and/or metal tape to protect the barrel from a slip or mistake.
2. Grind down the area where the pin/screw is inserted so that the top of the pin is clearly visible. (note - you will destroy the muzzle device in removing it).
3. Mill around the pin/screw until part of the shaft is exposed, enough that it can be pulled out with locking pliers. If it is threaded, you will have to cut a small slot in the top of it so that it may be unscrewed, or rotate the plieres until it screws out. This can take some perseverance. This step is where you are most likely to damage the barrel, so take it slow.
4. If you are certain the pin/screw is completely out, and there are no other pins, you can unscrew the muzzle device. You must be certain all the pins are out. make sure the barrel is tightly clamped in proper barrel vise jaws. It is a good idea to grind down top, bottom and sides to ensure there are not more pins.
5. Not a good idea to do this before the AWB expires (if it does) or you now have an illegal assault weapon because you have a threaded muzzle with a pistol grip. You can put on a thumb hanger in place of the pistol grip to be legal, if you must have the threaded muzzle/flash hider before the AWB expires.
NOTE: If the muzzle device is pressed on at the factory as are the fulton armory muzzle devices, it may impossible to remove, although I have never tried to remove one of these, so I can't comment on removing pressed on muzzle devices.
Alternatively, on a postban, you can have a thread protector blind pinned on by a gunsmith, if you want the target crown look/functionality, but be advised the more partial depth holes are drilled in the barrel, the more chance there is of ruining the accuracy and integrity of the barrel.
If you choose to do this, make sure you understand the risks and legalities involved before you attempt it.