Asalaamu Alaikum
It is very unfortunete that no one has responded to this thread because the justice system in Islam is really what made the Islamic Caliphate so amazing. It should also be realized that there are some similarities with Jewish judicial system and Islamic and even Islamic and the West.
With regards to your questions please understand I am a layman and not a scholar. I can't guarantee the validity of my answers and I dont quite have proof to back it up except from what I have heard is the general consensus.
how is the system set up? Say in a criminal case, how is justice applied? Is the accused presumed innocent or guilty? Do you need a certain amount of witnesses?
The accused will not be punished in any way until he or she has had a trial. This implies the rule innocent until proven guilty because they have a right to speak and give their side before any action is done.
And depending on the case will depend on if witnesses are needed or not. With regards to fornication or adultery a minimum of 4 witnesses is needed. Their character is all taken into consideration. Although it isnt impossible for someone to be punished for fornication or adultery , it is very rare. Because not only does Islam require 4 witnesses but Islam also highly values privacy. So let us have an example scenario
Man is committing fornication with a woman and 4 people suspect it. There fore, they spy through the persons window and clearly see fornication
After they see the fornication they report it. The accused are given a trial. When the judge asks how the people saw it and they say that they saw it by spying the judge could very possibly dismiss the case and in fact punish the people for spying and invading privacy!
But no upright Muslim would spy in the first place because the Prophet(saws) said that if someone is caught peeping through a hole they can get their eyes plucked out! All though this may seem harsh it is a great deterrent and a great message: don't spy! Respect privacy! In fact, Ibn Uthymeen once saw women dancing around men and the men were intoxicated. He wanted to punish them was reminded that he can not because they were in their own house and privacy is respected! This is why in the Muslim nations some houses have big barriers in front of it. It is to guard their privacy. I would like to say that in this life, Islam does not worry so much about what people do in their privacy because their privacy is respected. But at the same time we all know that Allah(swt) will hold us accountable for our actions in the here after so no Muslim should ever say that it is okay to sin in private but not in public. Rather it is sinful in both aspects but privacy will reign in the former. But we should all fear the punishment in the here after than in the world.
I know in a murder case, if the accused is convicted, the family may spare his life, but what happens after that? Does he go free or do they put him in prison? What if the crime was a sin like apostasy or shirk? Can his life be spared?
I believe the family can actually make that decision. If they can decide whether the accused can have death or not than they can certainly decide other actions. Allahu Alim
If apostasy or shirk is committed than they better do it in privacy and not publicize it because the punishments are grave. I havent heard any one permit their life to be spared unless they are not in a correct state of mind (maybe they became mentally unstable because of major depression or some thing.) All though the punishment sounds severe it is a way to deter people from leaving the religion. You must consider that we sincerely believe in an after life and hell is nothing short of misery. We dont want our family members facing this misery so we hope to do any thing possible for them to stay on the right path. The Jewish scriptures have said the same thing though interpretations have been different.
Allahu Alaim , God Knows best.