The defendant may challenge the conviction itself or may appeal the trial court's sentencing decision without actually challenging the underlying conviction. Appeals judges generally resist overruling trial court judgments and prefer to give trial judges wide discretion in the conduct of trials. Normally an appellate court will overturn a guilty verdict only if the trial court made an error of law that significantly contributed to the outcome. Put differently, an error by the trial judge will not lead to a reversal of a conviction as long as the error can reasonably be considered harmless. However, some types of errors are so grievous that they are presumed harmful, such as the use of a coerced confession in violation of the 14th Amendment.
Sentences are a different matter.
When the trial judge is given discretion over the sentence, the appellate court will rarely interfere. However, if the law requires a particular sentence and the judge gets it wrong, the appellate court will usually send the case back for resentencing. In Old English, writ means a letter, often written by an attorney. Writ was the name for an action in the courts. Most of the common law writs have been abolished and replaced by the civil actions we know today.