I believe you need to do a safety course to be able to buy a gun. Some friends who did it paid about $300 for a course that also included a hunting license. Here's one page I found on the topic: You must be logged in to see this link. All handguns are either restricted (special license) or prohibited. I'm not sure what is involved in getting the restricted license, other than for example becoming a police officer, but with I know with the normal license you can buy shotguns and hunting rifles.
psi has provided a great link. That is the one I was going to post. Should answer most of your questions.
Deal
Live free or die. Plain and simple.
"If you love wealth more than liberty, the tranquility of servitude better than the animating contest of freedom, depart from us in peace. We ask not your council or your arms. Crouch down and lick the hand that feeds you. May your chains rest lightly upon you and may posterity forget that you were our countrymen." - Samuel Adams
It's sad to see rhat someone would even have to ask these questions, no offense to thje OP. That said, I read posts from people on other forums, questioning theor rights to own a firearm in the USA! Canada had a long history of unrestricted firearms ownership. Now it resembles something like the UK, back in the 1970's.