In most modern American jurisdictions, a "writ" is an order from a higher court to a lower court or to a government official such as a prison warden. Defendants may seek several types of writs from appellate judges directed at the trial court or at a lower appellate court. (Many states have two levels of appellate courts -- an intermediate appellate court and the state supreme court.)
Writs, like appeals, are complex and involve picky details. Defendants facing situations where they may be entitled to take a writ should consult counsel.