"I think this has been posted a couple of times here by myself and NCCop, but here's a brief overview.
You must go to the Sheriff's office of the county in which you reside. Go to the front desk and ask for a pistol purchase permit application. Most counties require that you to have been a resident of that county for at least 6 months. Some counties require a few more months. You must fill out the entire form completely. You will need 3 witnesses to vouch for you. Two on the front page and one to fill out the last page in detail. The witnesses can't be roommates or share the same address with you. After you get all that, take down to the Sheriff's office and turn in. Some counties take a lot longer than others, but it is generally dependent on the population. Good thing you're 21, 'cause if you weren't you can forget the pistol purchase permit. I you have any more questions, feel free to ask and I'll answer them as best I can."
Actually, how long you have to be a resident and who you need as a reference is dependant on what county your are in also.
The county I grew up in (Orange), the Sheriff required you be a resident of the county for at least a year and provide three references who also live in the county who are not related to you.
When I moved to Alamance County I got permits less than 30 days after I moved there and used my fiance (same address as me) as a reference. They only required one.
Wake Couty requires 30 day residence I think. I lived there for a while, but I never got a pistol permit there.