A jail-writ, often referred to as a writ of habeas corpus, is a legal order that requires a person in custody to be brought before a court to determine the lawfulness of their detention. This writ protects individuals from unlawful imprisonment and ensures that they can challenge the reasons for their confinement. It serves as an essential safeguard against arbitrary detention by the state.