There are three major ways in which a Supreme Court decision can be overturned.
If the decision is based on a law that Congress has passed, Congress can simply change the law. The Court sometimes has to rule on how they think laws made by Congress apply to certain cases. If Congress thinks the Court has gotten it wrong, they can change the law to make things clearer.
If the decision is based on the Constitution, the Constitution can be amended. For example, the Supreme Court has said that the Constitution bans school-sponsored prayer. If enough people wanted to, they could pass an amendment allowing such prayers.
Finally (and this is the most common way of overturning Court decisions) a later Supreme Court can decide that a certain decision was wrong. For example, the Supreme Court's decision in Brown v. Board of Education effectively overruled the decision in made 58 years before in Plessy v. Ferguson.