The Mental Health Act 
If you receive psychiatric treatment in a hospital or psychiatric unit on a voluntary basis you are known as an "informal" patient and legally you have exactly the same rights as someone treated in hospital for a physical problem. As an informal patient you are free to accept or refuse treatment as you wish.
"Formal" patients are people who are compulsorily detained under one of the sections of the Mental Health Act 1983. As a formal patient you lose some of the rights that informal patients have. Besides losing your right to leave hospital when you wish, for instance, you might also be given drug treatment - and, less commonly, ECT - without your consent.
A person cannot be compulsorily detained or 'sectioned' unless the criteria stated in the Act are met and there is considered to be no suitable alternative. For someone to be detained for longer than 72 hours requires agreement by a team of mental health professionals and this should be only after careful assessment and with sectioning used as a last resort.
The Mental Health Act states how people can be admitted to and detained in hospital. It is a complex law and open to different interpretations. See Useful Information / Publications for sources of detailed information about the Act, and The Mental Health Act - Some Sections for brief introductions to some of the most commonly used sections.
Changes to the Mental Health Act
Note: The Mental Health Act 1983 has been amended several times since it first became law and the information that follows includes those amendments where appropriate. The most significant recent changes are contained in the Mental Health Act 2007, itself a series of amendments to the 1983 Act, and introducing some new powers, such as Community Treatment Orders, and some new rights.
Sub-categories 
Useful Information / Publications
Your Right to Information
Your Right to Refuse Treatment
Mental Health Assessments
The Mental Health Act - Glossary / Definitions
The Mental Health Act - Some Sections
Your Right to Appeal
Some useful organisations and services 
Care Quality Commission - Mental Health Act
Target Group(s)   People detained under the Mental Health Act, people subject to guardianship or placed on a Community Treatment Order (CTO).
Area Served   England.
Mental Health Review Tribunal Office (England)
Target Group(s)   People detained under the Mental Health Act 1983, also their 'Nearest Relative' under the Act.
Area Served   England.