The remedy depends on the issue won. In some instances, you will get a new trial. In some instances, the case will be remanded back to the trial court for the trial judge to reconsider things under a new lens. In some criminal matters, the entire case could be thrown out. Whether your case is remanded for reconsideration or thrown out entirely will entirely depend upon the particular mistake or legal error.