From the wikipedia article:
District of Columbia v. Heller, 554 U.S. 570 (2008), was a landmark case in which the Supreme Court of the United States held that the Second Amendment to the United States Constitution protects an individual's right to possess a firearm for traditionally lawful purposes, such as self-defense within the home and within federal enclaves. The decision did not address the question of whether the Second Amendment extends beyond federal enclaves to the states, which was addressed later by McDonald v. Chicago (2010). It was the first Supreme Court case in United States history to decide whether the Second Amendment protects an individual right to keep and bear arms for self-defense.