Anytime you purchase a firearm at a gun shop, there are a variety of regulations that are followed. The proprietor needs to maintain a Federal Firearms License (FFL) and abide by those regulations. Customers need to fill out a form 4473 and pass a background check. The background check is performed by the FBI and is called the National Criminal Background Check System, or NICS.
I wanted to share some statistics with you. For purposes of scale, the United States currently has about 311 million citizens.
Since 1998 the FBI has performed about 159 million NICS checks. Now, keep in mind many gun owners own more than one firearm, so this doesn't translate into 159 million gun owners. It doesn't even translate into 159 million guns sold, as some of those checks result in a denial of sale.
In 2011, the busiest year on record, 16.4 million checks were done.
1.1% of those checks resulted in the FBI denying purchase of a firearm. I'm not aware of any arrests made by prohibited people trying to buy guns in 2011. That's a felony, by the way.
8.3 million people are on the prohibited list and would be denied a firearm purchase. Compare this against the current US prison population at 1.6 million.
1.8 million of those are due to mental illness issues.
Kentucky is the state with the most checks, followed by Texas and California.
I think the statistics show that the NICS system is effective at keeping guns out of the hands of prohibited people. I think it could be even more effective if states were more compliant with reporting their mentally ill to the FBI, as they are required to do by law.