After the Norman conquest of Britain in 1066, benefit of clergy allowed all who had tonsures or wore ecclesiastical dress to be tried for criminal offenses by ecclesiastical rather than secular courts. Before that, bishops sat beside secular officers in such trials.
The reason for seeking to claim benefit of clergy was that punishments for offenses, even serious ones, by ecclesiastical courts, were generally a great deal lighter than by secular courts, and the death penalty was almost never given. Clerks brought before a lay court could prove a claim to benefit of clergy by reading, as only the clergy were generally able to read. This gave rise to the extension of the benefit of clergy to all who could read.
Things were tightened up a little in Henry VII’s reign (perhaps because of more widespread literacy), and a distinction was drawn between people in Holy orders and people who were able to read but otherwise secular. The latter were allowed the benefit of the clergy only once. On receiving it they were branded on the left thumb with a hot iron to afford evidence against them in future. Henry VIII had even the clergy branded for the first time, but Edward VI abolished this, although he excepted serious crimes such as murder, poisoning, burglary, highway robbery, and sacrilege from benefit of clergy. Lords got off lightly, though, as they were discharged for any first offense, except murder and poisoning, whether they could read or not.
When the civil courts had dealt with offenders by burning a layman on the hand, discharging a clerk who could read or discharging a peer with neither burning nor penalty, they were dealt with by ecclesiastical law. The accused had to take an oath of innocence and find twelve witnesses to testify to their belief in the falsehood of the charges. Afterwards he brought forward witnesses to completely establish his innocence. If they were found guilty, the culprit was reduced to the laity, and all were compelled to do penance. Many escaped by perjury and leniency, which is why the privilege was annulled for serious crimes eventually.
Later these privileges were gradually eroded, and eventually branding was abolished, all privileges of benefit of clergy finally being abolished in England in 1827, having already been outlawed by the federal courts in the USA since 1790.