The 2nd Amendment states: A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed
After 216 years, the meaning of this amendment is still under debate. The debate largely focuses on the phrase "a well regulated milita". Many people believe that a "militia" is a loosely-formed group of citizens who provide their own local protection. In the 20th century, the argument was presented that the "militia" is actually the National Guard. The National Guard is an army in each state that takes care of state defense, as well as state emergency situations. They are also controlled by the Federal government and often get sent into battle along with Federal military troops. Most of the people commenting on this website do not believe that "a well-regulated" militia means the National guard.
Because the U.S. Supreme Court, in 1939, ruled that "a well-regulated militia" applied to military weapons, numerous laws have been made that limit the types of weapons that may be bought or owned. Sawed-off shotguns are illegal. Machine gun owners must pay a large fee and submit to a difficult criminal background check in order to own a machine gun. Military-style weapons are basically guns that LOOK LIKE, but do not FUNCTION LIKE, an Army machine gun. Laws that banned these weapons were largely based on people's fears, and have no legitimate reason for banning them. They function similarly to many other legal guns, but are "scary looking" to those people who don't know about guns.
In the U.S., one of the penalties for committing a felony (murder, rape, assault, etc.) is the taking away of certain Constitutional rights. Many felons (people who commit a felony) lose their right to vote in an election, own a firearm, or drive a car. They are also subject to searches that would be illegal for law-abiding citizens. Felons must go through a long and difficult process to restore their Constitutional rights.