When an individual is charged with a crime, he/she is brought to court and evidence for the case is given to a panel of judges. If the individual confesses to the crime then the law is applied but if not then the judges examine the evidence, and only if they find that the evidence is not one hundred per cent accurate will the law not be applied.
If the judgement passed by the judges was that the law should be applied, then the case is sent to a higher court. The higher court re-examines the case again, as well as the judgements of the previous court to ensure that it is one hundred per cent accurate.
And if the higher court also feels that the law should be applied then the judgement is sent to the king/ruler for his approval. The case is then re-examined again to make sure that it is one hundred per cent accurate and only then will the law be applied.
We were instructed to carry out the cutting of hands or heads, stoning people to death, lashing, etc. in public [amid] the greatest gathering of Muslims, excluding the two holy days (Eids) and the pilgrimage (Hajj), which are on Fridays.
It was the practice of the Prophet to gather as many people from the community to witness the implementation of Islamic law. Executing the individual was not just punishment for that individual, but it was also awareness to the people of what will happen if they committed the same crime.
One of the distinguishing factors between Islamic criminal law and Western criminal justice is public executions. In the past, the west used to execute people and then they stopped.
Afterwards, they made an analysis that concluded that the crime level didn't decrease due to executions, so there was no reason to bring it back. However, in Muslim society, public executions do keep crime levels down and this is a fact.
Conclusion
It can be estimated that the population of Saudi Arabia is similar to the population of New York City, but the number of murders which are committed in Saudi Arabia in a year is less than the number of murders which are committed in New York City in a week. One of the key factors for this is public executions.