The primary restrictions are:
You must be 18 years old to own a long gun(rifle).
You must be 21 to own a handgun(pistol).
You must live in a certain state to own NFA tax stamp items.
You must purchase an NFA Tax Stamp($200) to purchase a suppressor, short barreled rifle, or "sawn off shotgun".
You must be 21 to purchase ammunition for a handgun(even though multiple rifles use it).
To own a machine gun(full auto) it has to be made before 1986 and you need tons of licences not available to civilians. Not to mention that machine guns cost over $20,000.
California: No adjustable stocks(make it easier for small and large people to use the same gun), no magazines over 10 rounds, and no bayonet lug(allows you to attach a bayonet).
New York City: No guns besides bolt action and pump action rifles.
Illinois: You need a FOID card(license that puts you through a background check) to purchase, possess, or
touch firearms and ammunition. No suppressors(not even if they are brought from out of state). No NFA Tax items.
Chicago(Illinois): No magazines over 10 rounds. There are more but I forget.
Some states have open carry which allows you to throw your rifle over your shoulder and walk around town or wear an external holster. All without a license.
In order to carry a handgun concealed you need to take a class and get a special license. And even then most places won't let you carry.
Oddly Slide fire is legal.
Fun fact: If you possess an illegal firearm in California you go to prison for 2 years. Also in California the penalty for raping a female police officer is 6 months in prison.