Habeas corpus is a recourse in law by which a report can be made to a court in the events of unlawful detention or imprisonment, requesting that the court order the person's custodian to bring the prisoner to court, to determine whether their detention is lawful.
writ of habeas corpus
In common law, a writ is a formal written order issued by a body with administrative or judicial jurisdiction; in modern usage, this body is generally a court. Warrants, prerogative writs, subpoenas, and certiorari are common types of writs, but many forms exist and have existed.
A writ of attachment.
1702 Writ of Attachment signed by Chief Justice John Guest of the Province of Pennsylvania in the name of Queen Anne
Return of the Writ shown above, endorsed by the Sheriff of Philadelphia, stating that he is still in possession of the attached property for want of a buyer