Well, this is kind of the $64,000 question of American Politics. Per the 9th Amendment of the Constitution, the body of rights afforded to the people is not limited to those listed in the bill of rights, and per the 10th Amendment, the Federal Government cannot claim powers that are not expressly given to it in the Constitution, and any power is either the states (unless expressly restricted power to the state) or the peoples.
That would seem simple, but the Interstate Commerce Clause has been used to coerce compliance. This is seen in the Interstate Funding legislation often... the Interstate Roads are federally funded, but those funds are given to the states to maintain the roads... so Texas is paid by D.C. to maintain the interstates within Texas. There have been numerous rules attached, such as 21 being the legal drinking age, that were enacted such that states with lower ages wouldn't be funded... Even though Congress can't legally mandate a drinking age, it can say we won't spend money on states that don't mandate it... and then the states all passed laws.
That said, a SCOTUS decision did say that the Feds can only do this if the restriction is related to the funds being distributed.
Typically, almost any crime you committ can be tried twice (once by the state, and once by the feds). Ordinarily, the Feds do not try the case if the states trial happens and the outcome is sufficient... but from time to time they get involved. The current Recreational Marijuana issues have not been pursued because the DOJ has better things to do, but they can if they want to.
Generally, when this occurs, the Federal Government will sue the state (or the reverse... maybe... depends on why) and if particularly bad it could go up to the Supreme Court. The latest threat of this is the US government threatening suit against California over the state's Net Neutrality law, which the U.S. is likely asserting is illegal because it affects interstate commerce and since the bulk of tech firms are in California, this would essentially be California making law for the entire country.
TL;DR: The options used are generally a lawsuit or taking money that they would give related to that matter away from the states. There is a general presumption that Federal Law will trump state law if both are capable of making laws in the same area, though often the Feds will not persue a federal crime if a state crime is equally satisfying.