What is a Writ of Habeas Corpus?

A writ of habeas corpus is an instrument for safeguarding individual freedom against arbitrary and lawless state action, If you were to file and habeas corpus, you would the petitioning the court objecting to a person’s detention or imprisonment.