The decision in DC v Heller recognizes that each individual has an individual right to keep arms in their home, unconnected with any kind of military function or service.
Prior to this decision, many cities such as Washington DC and Chicago had a total ban on citizens keeping handguns in their home for any reason. The decision in this case together with the decision in McDonald v Chicago resulted in Chicago citizens being once again able to legally own handguns in their home. DC v. Heller overturned the handgun ban in Washington DC, and McDonald v Chicago overturned handgun bans in Chicago and all other states in totality.
You may remember the wording of the Second Amendment from high school or college civics:
A well regulated militia being necessary to a free state, the right of the people to keep and bear arms shall not be infringed.
In DC v Heller, the court also recognized there are two parts to this statement. The first part, "a well regulated militia being necessary to a free state," was called a "prefatory clause" because rather than creating a limitation, it simply states a purpose - one of many possible purposes. That is, a well regulated militia is one valid purpose, and there are additional valid purposes not listed. For example, if you own a pickup truck, one purpose of the truck could be pulling a boat. Another purpose could be moving furniture into your new home. Maybe moving furniture wasn't mentioned in the advertisement when you bought your truck, but it's still a valid purpose - one of many.
The second part, "the right of the people to keep and bear arms shall not be infringed," states a limitation placed upon the government. Back to our civics class, you may remember the wording of some of the other amendments. The first nine amendments in the Bill of Rights are all worded as limitations and restraints placed upon the government.
Chicago's and DC's handgun bans were restraints placed upon the people - Chicago and DC had it exactly backwards.