You have a right to your personal freedom. The government cannot take away your freedom by detaining you without good reason - even for a short period.
For example, if you are caught up in a demonstration and the police cordon you off for an unreasonable amount of time, this might be a breach of your right to liberty.
Importantly, the Human Rights Act provides that if you are arrested, you have the right to:
A hospital psychiatric department held a number of mental health detainees who spoke little or no English. Members of a user-led mental-health befriending scheme were concerned about the fact that the services of an interpreter were not available when detaining these patients. They used human rights arguments based on the right to liberty and the right not be discriminated against on the basis of language to argue successfully for a change in the hospital’s practice of failing to provide an interpreter. (Example provided by the British Institute of Human Rights)
In certain circumstances, public authorities can detain you as long as they act within the law. This applies, for example, if:
1. Everyone has the right to liberty and security of person. No one shall be deprived of his liberty save in the following cases and in accordance with a procedure prescribed by law:
a. the lawful detention of a person after conviction by a competent court;
b. the lawful arrest or detention of a person for non-compliance with the lawful order of a court or in order to secure the fulfilment of any obligation prescribed by law;
c. the lawful arrest or detention of a person effected for the purpose of bringing him before the competent legal authority on reasonable suspicion of having committed an offence or when it is reasonably considered necessary to prevent his committing an offence or fleeing after having done so;
d. the detention of a minor by lawful order for the purpose of educational supervision or his lawful detention for the purpose of bringing him before the competent legal authority;
e. the lawful detention of persons for the prevention of the spreading of infectious diseases, of persons of unsound mind, alcoholics or drug addicts or vagrants;
f. the lawful arrest or detention of a person to prevent his effecting an unauthorised entry into the country or of a person against whom action is being taken with a view to deportation or extradition.
2. Everyone who is arrested shall be informed promptly, in a language which he understands, of the reasons for his arrest and of any charge against him.
3. Everyone arrested or detained in accordance with the provisions of paragraph 1(c) of this Article shall be brought promptly before a judge or other officer authorised by law to exercise judicial power and shall be entitled to trial within a reasonable time or to release pending trial. Release may be conditioned by guarantees to appear for trial.
4. Everyone who is deprived of his liberty by arrest or detention shall be entitled to take proceedings by which the lawfulness of his detention shall be decided speedily by a court and his release ordered if the detention is not lawful.
5. Everyone who has been the victim of arrest or detention in contravention of the provisions of this Article shall have an enforceable right to compensation.
Austin v Metropolitan Police Commissioner (2005)
On May Day 2001, thousands of people took part in a political demonstration in Oxford Circus, London, halting traffic and ordinary business. The police had been given no prior warning of the protest and the demonstrators were generally uncooperative. The police cordoned off an area that held some of the demonstrators and non-participants. The cordon was maintained for over seven hours, and physical conditions within the cordon became unacceptable. One demonstrator and one bystander caught up in the action brought their cases to the courts. The High Court held that the cordoning off action implemented by the police had resulted in the deprivation of liberty of all those held, but was justified as falling within one of the specified exceptions to the right of liberty because the police had taken the action to prevent acts of violence.
(Case summary taken from Human rights, human lives, Department for Constitutional Affairs, 2006.)