Returning to the text of the Second Amendment itself, the right to keep and bear arms is expressly retained by "the people," not the states. Recently the U.S. Supreme Court confirmed this view, finding that the right to keep and bear arms was an individual right held by the "people," -- a "term of art employed in select parts of the Constitution," specifically the Preamble and the First, Second, Fourth, Ninth and Tenth Amendments. Thus, the term "well regulated" ought to be considered in the context of the noun it modifies, the people themselves, the militia(s).
The above analysis leads us finally to the term "well regulated." What did these two words mean at the time of ratification? Were they commonly used to refer to a governmental bureaucracy as we know it today, with countless rules and regulations and inspectors, or something quite different? We begin this analysis by examining how the term "regulate" was used elsewhere in the Constitution. In every other instance where the term "regulate" is used, or regulations are referred to, the Constitution specifies who is to do the regulating and what is being "regulated." However, in the Second Amendment, the Framers chose only to use the term "well regulated" to describe a militia and chose not to define who or what would regulate it.
It is also important to note that the Framers' chose to use the indefinite article "a" to refer to the militia, rather than the definite article "the." This choice suggests that the Framers were not referring to any particular well regulated militia but, instead, only to the concept that well regulated militias, made up of citizens bearing arms, were necessary to secure a free State. Thus, the Framers chose not to explicitly define who, or what, would regulate the militias, nor what such regulation would consist of, nor how the regulation was to be accomplished.
Source