Habeas Corpus is a writ issued by a court ordering a person holding another in custody to produce the prisoner in court and explain the detention. If the detention is found to be unlawful, the person is released. It is a fundamental safeguard against arbitrary arrest and detention.