How is habeas corpus carried out?

Answer :

Answer:

A writ of habeas corpus is used to bring a prisoner or other detainee (e.g. institutionalized mental patient) before the court to determine if the person's imprisonment or detention is lawful. A habeas petition proceeds as a civil action against the State agent (usually a warden) who holds the defendant in custody.

Explanation:

Answer:

Habeas corpus protects you from being held in detention or jail without reason.

Explanation-

A writ of habeas corpus is where the court has to tell you what you have been imprisoned for and why. The government can't just arrest you on a whim, the officials have to have solid proof, that proof had to be gotten legally.