Habeas Corpus is latin for"bring the body forward" Long ago when an individual complained to the king that he was being illegally detained, it was the king's order to bring the detained person before him, along with the person detaining him, so that the king can hear the reason for the detention. Today it is considered a civil proceeding (analogous to a law suit) outside the criminal court system. A superior court or district court judge would issue a writ (order) requiring that the detained or jailed person and the person holding him appear for a hearing to determine the legality of the detention or restraint. It is a very valuable right that can be exercised by the righteous when the criminal court system has failed. The proceeding is also used when someone is being held by a psychiatric hospital against his willor when a person is not in custody but his rights are being violated in some other way.
Just adding to what Attorney Cohen already stated, there are time limitations for which to file a writ for criminal convictions. Upon sentencing, a judge is supposed to inform a defendant that they have 12 months from the date of sentencing to file a writ for a misdemeanor and 4 years from the date of conviction for a felony.
You are not limited to only being able to filing a habeas if you are imprisoned. You can file a habes if your liberty is substantially more restricted than the general public. This means you still have a remedy if you are on parole or probation. As far as a habeas in the plea context, you frequently see these filed where an attorney gave their client bad advice or information and the client based his or her decision to plead guilty on that bad advice or information.
There are both State and Federal Habeas Corpus rights. The Federal usually requires that you exhaust all of your state remedies first and it also requires that there be a violation of a federal law (commonly a constitutional right was violated). The Federal habeas has a time limit of 1 year.
Legal disclaimer: Brian Tevis is licensed to practice law in the State of Georgia. All information given is based only on Georgia law and is not directly applicable to any other jurisdictions, states, or districts. This response, or any response, is not legal advice. This response, or any response, does not create an attorney/client relationship. The response is in the form of legal education and is intended to provide general information. Any state-specific concerns should be directed to an attorney who is licensed to practice law in that respective state.