It can take years. The first appeal is usually on the case and verdict itself, questioning the decisions and rulings made by the trial judge. The appeals court seldom endorses every ruling the trial judge made, but only rarely decides that the ruling amounted to reversible error, e.g. the case might have gone the other way had the judge ruled differently. Most errors identified by the appeals court are "harmless errors," indicating that a different ruling would still have yielded the same result. Most states have multiple levels of appellate courts. If the appeal doesn't result in a reversal at one level, the defense tries again at another level. If the defense in a state trial can identify some issue of constitutionality or civil rights, they can try their luck in the federal appeals system, which has two levels: the circuit court of appeals and the U.S. Supreme Court. If all these fail, the offender might try to get an appeals court to rule that his trial attorney was incompetent.He obviously has to get another lawyer for this, but the levels of appellate courts are the same, and the process starts all over again. The offender might try to get a ruling that he has been mistreated while incarcerated, not provided the opportunity to adequately assist his appellate lawyer, etc. Inmates can be notorious abusers of legal process. When I was teaching in the 1990s, I used an example in class of a Florida inmate who had filed over 300 separate lawsuits against the prison system. One of his claims was that another inmate received a square piece of cake as a dessert, while his was round. The vast majority of these cases are dismissed as frivolous, but the prison system has to appear in court and respond to every one of them, or risk losing by default. It's an easily abused system, but it's necessary to ensure that people are not railroaded at trial or mistreated while incarcerated. It could still use some fine tuning.