Supremacy Clause. Federal law trumps State law. Up to the Federal gov. if they wanna pursue it or not.
Yes and no. Constitutional Law has the final say over any of them, and states can act in a position to legalize things locally in their state that would still be illegal under Federal Law, so long as it does not violate the U.S. Constitution. They can also do things in support of the U.S. Constitution under specific circumstances should they feel that Federal Law is trying to break it.
For example in the first type, California legalized medical marijuana. It is still illegal under Federal Law, but not State Law. That means if the law is followed correctly in the state, California citizens can use medical marijuana without any state or local authorities arresting them. HOWEVER, federal authorities can still step in to make arrests based on federal versions of the crime. That being said, if the State and Federal Laws conflicted, and the state wanted to challenge the U.S. Government on it, they could so long as the U.S. Constitution doesn't disallow it.
Now for the second type, the general idea here is that Federal Law is trying to override Constitutional Law, and State Law does not agree with this in the states listed above. For this reason, as per Constitutional AND Federal Law, State Law may banish the enforcement of said Federal Law(s) in their state, should they feel it is a violation of the U.S. Constitution. The state can also legally fight against the Federal Law in U.S. Supreme Court, challenging its constitutionality, just as Federal Law can do to State Law in the state's Supreme Court. Federal Laws can still be enforced by federal authorities in the states that banished it, however it would give state and local authorities the right to legally arrest the federal authorities enforcing said crimes for state-based charges.
As a side note, Federal Laws often also differ greatly from State Laws, hence why these conflicts don't usually draw much attention to the media, with the exception of some cases. For example, some states regarding the use of marijuana, like California, may allow personal use up to a certain amount before stepping in to make an arrest, as anything lower would simply be a petty crime ticket, or a misdemeanor that is thrown out in court. However, although the Federal Law disallows
any personal use of marijuana, (just as state law usually does in most cases), federal authorities will not step in to actually make an arrest until it is found to be being used/sold/possessed/bought/made in a very large amount, else they leave the state authorities to handle it. This is done to prevent local and national laws from causing conflicts in arrests by double-charging someone, as well as preventing the over or under use of Local/Town, City, County, District, State, and Federal Law Enforcement. You obviously wouldn't want one state's State Police handling national drug import crimes, or the FBI/DEA dealing with a recreational marijuana smoker hiding behind Taco Bell, lighting up his pipe.
(Please also remember that the marijuana examples are just examples to compare the crimes and laws. The gun law situation is a bit different in itself, as you're comparing types, and not amounts, of something in question.)