Oh boy where do I begin. To answer your question no they're not illegal, its just extremely limited with what you can do with it. For a more in depth look at our laws, open the spoiler, just be warned of the massive text wall and mild stupidity you're about to open.
Spoiler
So I guess I should start from the beginning. Before you can buy a gun you have to get a license, which is pretty easy to do but takes a while.
Firearms classifications
Non restricted: Most long guns that are either semi automatic or Manual action.
Restricted: A firearm that has a barrel less than 470mm, is semi automatic, and/or can be adapted to fire when reduced to a length of of less than 660mm. As well as any hangun. Also, whatever they want to deem restricted they can.
Prohibited: Handguns with a barrel less than 105mm, any handgun chambered in 25 or 32ACP, and any firearm where the barrel was sawed off by someone who is not a licensed gun smith. Firearms sold with a short barrel from the factory do not fall under this rule. Any firearm they deem prohibited.
Acquiring a license
To get a firearms license in Canada you have to take a firearms safety course, written and practical, only takes a day but the courses fill up ridiculously fast. Upon completing the practical (where you're only allowed 2 mistakes I believe) you take the written test where you have to score at least 84%. Once those are completed the course instructor mails of your results to your provincial Chief firearms officer, he stamps it and sends it back to you, usually takes about 2 weeks to get it back. Once you get it back you send that, a photo, a check, and this questionnaire package that you fill out (basic tombstone information, references, ex-wives) and you mail it to the RCMP where by law it has to wait for 28 days before its even looked at. After what should only be 2 months of waiting you finally get your license in the mail. Now keep in mind, above I said that it should only take a day to do the course and test, that's only if say you just wanted the non restricted. If you also want the restricted license you have to do another day, usually the same weekend.
Purchasing a firearm
So you finally have your gun license and just want to buy a gun and go shoot, easy process right? Well yes and no. If its a non restricted firearm, you go to your store of choice (not cabelas), pick out your gun, buy some ammo, and walk out with it all in the same day no problem what so ever. If its a restricted firearm, you pick out the one you want, put a down payment, and wait cause it has to be registered. The registration process varies from province to province, but should't take that long as long as they're not back logged at the RCMP. The shortest amount of time I've waited is 12 hours, the longest I've seen it take is 4 months.
Storing a firearm
So this is where it gets a little confusing and the lack of black and white laws come into effect. A non restricted firearm can be stored a number of ways. It can be in a safe or even in a closet. If its in a safe just throw it in. If it's outside of a lockable container, you have to find a way to make it inoperable, remove the bolt, throw a trigger lock on it, duct tape it shut, your choice. Ammo cannot be in the same room as it if its out in the open unless you lock your ammo in a container then it can be in the same room. Now if its in a safe, you don't need a locking device AND you can keep ammo in the same safe. Shit, you can even have a loaded magazine right next to it in the safe and that's perfectly legal. For a restricted firearm it has to be double locked, so a locked container with a trigger lock as well. Unless its in a safe, then you don't need the extra trigger lock AND you can have loaded magazines right next to it. If this all seems confusing that's okay, its like that on purpose.
Transporting
I'm gonna keep this one simple;
Non restricted - Just has to be unloaded, if you have to leave the car just throw a trigger lock on it and try to keep it concealed
Restricted - Gun has to be trigger locked in a locked case and concealed. Can't leave the car and must take the most direct route to the range.
Where can I shoot?
This is where things get really stupid. If its non restricted you can shoot it at any licensed range or private property so long as its outside city limits. You can also shoot on whats called crown land, essentially large parts of land the government owns that no development can be done on, the only rule is you have to be a few hundred meters from the highway and shooting away from it for obvious reasons. A restricted firearm can only be shot at licensed ranges, and most wont let you shoot there unless you're a member. If you're caught shooting a restricted firearm outside of a range your guns are confiscated, and you and anyone with you will face and be convicted with a criminal charge that's usually more costly and life altering than if you were to commit armed robbery. I'm not joking. So I can buy and own a semi automatic .50BMG and shoot it on buddy's property no problem, but if I then pull out a single shot .22LR handgun we would all be breaking the law.
Now if y'all remember up top I mentioned the prohibited class and what it is but never went into any details. Basically we had a massacre at a school in Quebec where some piece of shit went and shot a bunch of women with a Mini 14 (a gun that's still non restricted btw). After this happened the government went all out on the firearms community and banned a whole bunch of guns in the early 90's. What was the criteria for the ban? Well, and this isn't a joke either, they went and got a vanload of suburban soccer moms, gave them the big book of guns 1989, and told them to go nuts. They chose a whole bunch. Here's a short list of things I'm jealous I cant own;
-Any AK variant (for some reason the Dragunov falls under AK)
-Any FAL variant
-Any model of Steyr Aug
-The SPAS 12 (I know its hot garbage)
-Any variant of the HK MP5 (But I can own a CZ Scorpion)
The list goes on and on. The best part about it is there's guns in the full list that were extremely limited production prototypes like the HK G11, and for a while even Harrison Fords pistol from blade runner was on that list. Also I know I said that we cant own AK's because they're prohibited, but that's not entirely true. I can own one variant of AK, the Valmet M71. Why? Because back before the ban happened the Canadian government sold a large number the first nations populations up north to hunt with, realizing it wouldn't look good for them to go and confiscate firearms from the native population they let that one slide. Yet I can own a VZ58 or a type 81 no problem, but I can't have an AK. For the longest time the AR15 was non restricted, but they arbitrarily reclassified it to restricted overnight about 15 years ago.
One more stupid rule we have before I end this post/rant is our rules on magazine capacity. It is such a huge grey area it borderlines on insane.
-Handguns are limited to ten rounds only. Manual action firearms are not limited what so ever. Want a 100 round drum mag on your Lee Enfield? Have at her.
-.22's have no limits either unless its a ruger 10/22, then its only 10 because the RCMP shat their pants when you yankees came out with the ruger charger (which is considered a pistol) and arbitrarily banned anything over 10 rounds for the 10/22 overnight. No warning, no announcement, just a blurb on their website. There's still some people that don't know about this rule, and the RCMP has told its officers not to arrest or confiscate because they know they'd get shredded in court.
-Semi automatic rifle magazines are limited to 5 rounds. The only real exception is the M1 Garand that's still allowed to use 8. But what if your semi automatic takes pistol magazines? Then you can have 10 rounds. What if this magazine was made for the AR15 Pistols chambered in 5.56 they have in the states and has pistol stamped into the side? Well its a pistol mag, pin it to ten. It happens to fit in your AR15 rifle no problem even though it wasn't technically designed for the rifle? No big deal, blast away with your 10 rounds kid!
-Semi automatic shotguns are also a weird beast. Its a semi auto so it has to be limited to 5 right? Yes and no. Its limited to 5 for the longest shell it can take. You have a 3-1/2" semi automatic goose gun? Go ahead and shove 12 of the federal shorty's in their, sure its more than 5 but those aren't 3-1/2" shells so you're A-OK.
If it seems like I'm frustrated its because I am. If any of you have any questions I'm more than happy to try my best and answer. One last thing I forgot to mention, just because you finally got to pick up your handgun, doesn't mean you can shoot it right away, you have to wait for the registration certificate to come in and it has to stay with the gun at all times, usually arrives 2 weeks after its been registered to you.