The most binding kind of precedent is that set by cases decided by the U.S. Supreme Court. The decision of any court, however, can set a precedent. Sometimes, lower courts do not follow a precedent set by a higher court. In these cases, the appellate court can reverse the lower court decision on appeal.
The rule that determines whether a criminal case should be filed and tried in federal or state court is this: If an act is a violation of federal law, the trial will be held in a federal court; if an act is a violation of state law, the trial will be held in a state court. A crime that violates both federal and state laws (such as kidnapping, transportation of narcotics, counterfeiting, or robbery of a federally insured bank) may be tried in both federal and state courts if the prosecutors so desire.
For example, if X robs the Miami National Bank, X can be prosecuted for the crime of robbery under Florida law and for robbery of a federally insured bank under federal law. The prosecutions are for the same act but involve two different laws. There is no double jeopardy because of the concept of dual sovereignty, which means that federal and state governments are each considered sovereign in their own right.