In short, a lot of appeals. First, they have to bring their case to a lower court. Then, if they don’t agree with the decision, they’ll appeal to a higher appellate court. Next, it goes to a district court, then appeals to the SCOTUS, and the Supreme Court has to decide whether they want to take the case or not. If it is a constitutional issue and is relevant, the court may decide to take it but they take very few cases.