This section constitutes an overview on California habeas corpus practice as it relates to the handling of criminal appeals. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully.The inmate may file a petition for writ of habeas corpus. How Do I Fill Out the Form? There is an official form (Judicial Council Form HC-001) for filing a state petition for writ of habeas corpus. A habeas corpus petition is a civil matter that contests a defendant's incarceration or restriction imposed as a sanction in a criminal case. Habeas corpus refers to the principle of freedom from unlawful detention. The U.S. Supreme Court interprets the Constitution, which means it defines constitutional rights and violations in the cases it decides. Essentially, it's a safeguard against unlawful or arbitrary detention. What is the process of the writ of habeas corpus?