The Supreme Court of the United States has held that the phrase "the people" in the second amendment confers an individual right to bear arms, and does not simply confer a right on a collective group of people to own guns. Such an interpretation would be inconsistent with the other rights set out in the bill of rights which only apply to individuals.
The text of the Second Amendment specifically ties the right of gun ownership to the idea of militias; it says nothing about the individual right to bear arms and makes no mention of citizens in singular, only plural. At the time of its writing, militias were needed because the United States had no standing army. Militias were our national defense, and these men used their own weapons. Once we had a standing army, national defense shifted away from militias. Legally, the right of unfettered gun ownership should probably have evaporated at that point because of how the amendment was worded. It does not appear to provide basis for individual ownership rights as we know them now.