For the system of precedent to work there must be strict rules for a judge to follow. There is a system of hierarchy where higher courts bind lower courts.
The European Court of Justice binds all UK courts.
The House of Lords is the highest appeal court in UK. Binds all lower courts and itself unless the decision was ‘per incuriam’ (in error) or it uses the Practise Statement 1966, which is used very sparingly and only when it would be just or right to depart from an earlier decision.
The Court of Appeal binds all lower courts and itself unless under Young v Bristol Aeroplane Co Ltd where the decision was per incuriam or where two Court of Appeal decisions conflict or where House of Lords decision overrules the Court of Appeal.
The lowest court in the hierarchy is the Magistrates court. They are bound by all higher courts. Its decisions do not form binding or persuasive precedents.
For the doctrine of precedent to work there must be an accurate record of law reporting e.g. All England Law Reports and Weekly Law Reports.
When faced with a precedent a judge can do one of four things.
Follow. If the facts are sufficiently similar, the court must follow the precedent and apply the law in the same way. Daniels v White followed Donaghue v Stevenson.
Distinguish. If the judge finds the facts of a case sufficiently different from the case setting the precedent, they can distinguish the two cases to avoid following the precedent. Philips v Brooks distinguished Cundy v Lindsay.
Overrule. Judges in higher courts can overrule decisions of lower courts if they consider the legal principles to be wrong. Pepper v Hart overruled Davis v Johnson.
Reverse. Where a case goes to a higher court on appeal, if it considers the law to be wrongly interpreted it may reverse the decision. Pepper v Hart.
Judicial precedent has many advantages.
People know what the law is and how it will be applied. This creates certainty in the law, and may avoid court action.
Similar cases are dealt with in a similar way. This creates consistency.
There is flexibility in the system via overruling and distinguishing which allows the law to change to changes in society. R v R (1991) House of Lords recognised for example rape within marriage.
The statement of law is very detailed and relates to the precise facts of the case, this leads to detailed practical rules.
Judicial precedent also has many disadvantages.
The number of reported cases is growing. This makes it difficult to know all the cases which might be relevant. Additionally, judgements are very detailed which makes it difficult to establish the ratio decendi.
The judge must follow binding precedents. This means that bad or inappropriate decisions (R v Brown) cannot be changed unless heard by the court that made them.
There is a lack of democracy in the system. Judges are actually making law and this is not part of their role under the separation of powers.