OK, first, if you DID get any new weapon that has excessive headspace, send that sucker back.
If it's an older weapon of yours or one you purchased used, just go out and purchase a new barrel.
MOST chamber work I've done is done on rifles, generally centerfire rifles.
The steps are this (this is SEVERELY shortened)
Chuck up the barrel in the lathe.
Put the appropriate reamer on the steady (non-turning) end of the lathe.
Start the barrel turning (slowly) and bring the reamer into contact with the barrel.
After removing a certain amount (you should KNOW this measurement BEFORE starting this procedure) and it IS different with each headspace job.
Once you have turned down the chamber, mount the barrel to the receiver and put the bolt in place WITH the correct headspace gauge (don't forget that when you finally mount the barrel to the reciever you will have about two to three thousands of 'crush' - tightening down the barrel to the receiver).
Continue this procedure until you have correct headspace. Pull the barrel/receiver from lathe. Tighten down to include the crush. IF you made a mistake, remove the barrel from the receiver, put back in lathe. IF you cut the chamber too shallow, just continue cutting. IF you cut the chamber too deep, you will have to cut the end of the threading short, rethread it, then start over again.
LIKE I SAID, I shortened the procedure a lot. Like making sure the barrel is centered. Like properly mounting the chamber reamer. Like how to properly insert the chamber reamer into the chamber. LOADS OF THINGS.
Using a chamber reamer are NOT for the faint of heart. You will not only need to know HOW to use a lathe. You will also need to know how to mount and remove a barrel from the receiver. Thre so much to know, it's really something that is best left to a professional.
One mistake can cause catastrophic failure of the KABOOM kind.
So I hope that helps.