Tracer is mostly right. THe case you are thinking of (can’t recall the name right now) stated that the 2nd only applies to the Federal gov’t; however it also stated that the states could not infringe on the right as it was a natural right.
The Supreme Court has heard only five cases directly related to the Second Amendment. They are: U.S. v. Cruikshank (1876), Presser v. Illinois (1886), Miller v. Texas (1894), U.S. v. Miller (1939), and Lewis v. U.S. (1980). One the Supreme Court refused to hear, Burton v. Sills (1968), and one concerning the meaning of the Fourth Amendment and “the people”, U.S. v. Verdugo-Urquidez (1990), are also discussed.
U.S. v. Cruikshank involved members of the Ku Klux Klan depriving black victims of their basic rights such as freedom of assembly and to bear arms. The court decided that neither the First nor Second Amendments applied to the states, but were limitations on Congress. Thus the federal government had no power to correct these violations, rather the citizens had to rely on the police power of the states for their protection from private individuals.
This case is often misunderstood or quoted out of context by claiming Cruikshank held the Second Amendment does not grant a right to keep and bear arms. However, the court also said this about the First Amendment. The court explained that these rights weren’t granted or created by the Constitution, they existed prior to the Constitution.
Presser v. Illinois ruled that the states had the right to strictly regulate private military groups and associations. It also reaffirmed the Cruikshank decision that the Second Amendment acts as a limitation upon the federal government and not the states. However Presser also stated that setting the Second Amendment aside, the states could not prohibit the “people from keeping and bearing arms, so as to deprive the United States of their rightful resource for maintaining the public security…”