How old do you have to be to obtain a gun license?
You need to tell us more about the "gun license" and for what area. There are many different gun licenses.
In MOST of the US, there is no license to OWN a firearm- there are licenses to carry a concealed firearm, and licenses to hunt. While rules vary state to state, in most cases, you must be 21 to obtain a concealed weapons license, and hunters may be licensed at around 14-15 years old. You may purchase a rifle or shotgun at 18, and 21 for handguns.
At a gun store. But you need your Personal Acquisition License which entails a 8 hour firearms course for your "non-restricted" license. This allows you to purchase long guns and shotguns. If you want to buy handguns and certain restricted long guns, you need to obtain your "restricted" license, which is another, separate course. In order to obtain prohibited weapons you need special permission from your provincial Chief Firearms Officer and (I would imagine) yet…
This heavily depends on where you are and what you want to do. Most US states have no licensing for gun ownership. You can buy, own and transport (cased and unloaded) firearms freely. At the same time, most states require a license for carrying a loaded gun on your person. Elsewhere in the world, there are licensing schemes of various complexity. Check your local laws.