The rules on arrest and detention before charge are designed to protect civil liberties (specifying the limited circumstances in which a person can be arrested and detained - and providing safeguards whilst in detention) and also to protect the integrity of the criminal legal system (the Timothy Evans case is an example of abuses which led to a tragic miscarriage of Justice.)
The Police & Criminal Evidence Act 1984 sets out the main rules. Key Sections include
s24 Power of Arrest
s28 Duties upon the police arresting - to inform of the fact and reason for arrest
s30 Duty to take person to a police station as soon as practicable
s36 & 37 Custody Officers
s40 Requirements for periodic reviews of the detention
s41-44 Extension of detention beyond 24 hours
Codes of Practice also govern conduct of detention - for a list and further information, see here.
A further Washminster post on PACE can be accessed here.