There are many legal systems that operate in any given area. The federal government has its laws, your state has its laws, and then your county and city have their say too. Very often these laws match pretty well (either the lower jurisdiction implements compatible laws or they just leave it up to the feds), but sometimes there is conflict.
The state and federal line is the brightest, as prosecution of federal crimes goes through different channels than the prosecution of state-level crimes.
There is some debate as to whether federal or state laws should take precedence here, though the argument is kind of academic, as it's obvious the federal government wins in real life. From a constitutional standpoint, there's a decent case for the state's laws superseding the federal, but I mean, the state can't really stop the feds from arresting people for breaking federal law.