Dealing with the legal system in any country can serve as a confusing and difficult hurdle for anyone. This is especially true in the United States, where each state has its own rules and laws and court system.
Speaking in general terms, you will likely go to federal court for cases that involve federal jurisdiction or happen across multiple states. If the crime you get accused of involves state law, then you will likely go to state court.
Asking reliable sources of information
There are still exceptions to these generalizations, though. FAMM discusses the difference between state and federal cases, noting that the best way to determine where your case falls is simply by asking an attorney who knows the law well.
The federal and state prosecutors are the ones who decide what level to prosecute you on. As the defendant, you cannot do anything to sway this decision or change it after it gets made.
State and federal courts may also choose to prosecute the same crime at different levels. In this case, you will deal with two separate proceedings despite the charges remaining the same. You may face different sets of convictions or potential penalties, too.
Asking the court or examining documents
You can speak to the clerk of the courthouse your case will have its hearing in for more information, too. They can tell you whether your case counts as a federal or a state case.
You can also examine documents related to your case, as the first page of any of them should state the court system that will handle it. Through these means, you can tell where your case will go.