Obtaining a firearms license is a very non-uniform task, as each state has different regulations. Generally, a firearms license will be issued from your state's police force, or perhaps more directly from your county's police force. But the exact requirements you will have to fulfill in order to get your license can often vary, as can the rules on when you have to get the license, compared to when you buy the gun, and the rules on whether or not you must be fingerprinted by the police.
These rules are all very variable; the best way to determine your state's particular set of firearms laws is to ask at a gun store, where the staff will be more than likely to know the answers to all of your questions. Another good source of information on the path to obtaining your firearms license would be the website for your state police force, as it will likely contain relevant information there.
For states whose firearms laws do not require individuals to obtain licenses for the purchase of a given firearm, there will obviously be no additional fee for seeking the license. But for those states that do require permits, there may often be a fee, though it will likely not be much higher than $20 or so.
This will need to be sent in along with the application and any other requisite information, such as proof of completion of a firearms training course, or proof of fingerprinting, which you will have had to complete beforehand. Fingerprinting can be done at your local law enforcement agency, if it is necessary. Nowadays, however, background checks performed at the gun store itself can often eliminate the need for fingerprinting, as these background checks rely on an FBI database and occur at very high speeds.
As some general tips, it is a good idea not to actually purchase a gun at either a gun store, or online, until you have received your firearms license. The firearms license might not actually arrive at your home for some time after you complete all the necessary requirements of firearms laws, as there may be a waiting period of up to 30 days for any given state upon your application for a license. But it will always be safer to get your firearms license prior to buying the firearm, as generally you will have no longer than two weeks to obtain a firearms license after purchasing a firearm.
Again, the best possible way to be sure of your state's particular firearms laws concerning fingerprinting and payment is to attempt to find out from your state's law enforcement agencies, either directly or online. These sources are the most likely to have all the pertinent information, and to be able to guide you through the process.
Gun stores are a good secondary option, as they will also likely have the necessary information, but the application will have to be submitted to law enforcement anyway, so you might as well go there for your information.
NEXT: All You Need To Know About Purchasing Gun Parts