The Constitution guarantees that you have a right to liberty and freedom, except in accordance with the law.
This means that, in general, you are entitled to your own personal freedom but legislation may provide for your arrest and detention in certain circumstances. The state may only breach your right to personal liberty in circumstances that come within a law that provides for your arrest and/or detention.
If you believe that you are being detained or held unlawfully, you may make an application to the High Court. If the person or institution detaining you cannot justify the detention or prove that it is lawful, the High Court may order that you be released. This is called a "Habeas Corpus" order.