The United States is a federation.
Each state has a code of laws, and the federal government has one. You break a state law, you're going to state court. You break a federal law, you're going to federal court. You break a state law and a federal law, you're going to state and federal court.