It might be interesting to look at how it actually was in a medieval society. That is, post-viking Denmark. All in all, the laws of that time gives the impression of a very weak central (political) power, and a law that is concerned most of all with the protection of the citizens (the peasants) right of property. No feudalism, no aristocracy, no king trying to repress the citizens. Everybody just minds their own business - and if someone doesn't - they decide among themselves what the proper way of dealing with it is.
The idea of a judgewas foreign to the vikings. In each individual case all the freemen of the shire gathered and decided how to deal with it. It was custom, however, that their judgement became the law for future similar situations. In the beginning these laws were told from father to son, but eventually they became codified.
These laws were thus not the creation of a lawmaker, a king, but the collection of the judgements of the people. (In contrast to Drawmack's take).
By the middle of the 13th century, the power and influence of the king (the viking king was often nothing more than first among equals) had risen and he became the formal provider of the law. Before this happened, the only "royal" law regarded the king's henchmen.
The first general law says about itself: "The Law should be honest, just, reasonable, by the custom of the Land, practical and clear, so that every Man knows and understands what the Law says." It also says: "And the Law should not be done or written by the particular will of any Man, but in consideration of the welfare of every man residing in the Land."
"The Law, the King gives, and the Land accepts, he cannot later take back and change without the consent of the Land, unless it s obviously against the will of God." Thus, the King can't impose laws on the people, if the people refuse them.
By then slavery was almost abolished and the Law protected the weak: "It is the service of the King and the Chieftains to respect the judgements and be just and save those who is violently forced, such as widows and orphans and pilgrims and foreigners and the poor, which are often violated. He won't let arsonists, who won't let themselves be judged live in his shire, because when he tortures or kills those criminals, he is the servant of God and the protector of the law."
The judgements were formed on a ting - a parliament where the wise of the shire debated. Present were also the sheriff (ombudsmand). He was there to make sure procedure was followed, that the deliberation and punishment was done in proper fashion.
Some of the more frequent crimes; robbery, thievery, accidental/involuntary damage to other peoples property were decided by jurors, 8 or 12, and they decided whether the accused was guilty or innocent. Jurors were appointed for a year and you couldn't refuse - not without paying a fine of 3 Mark. Were a juror obviously unfriendly to an accused, the accused could dismiss that juror and demand a replacement. There were seperate jurors appointed for cases involving sacrileges and crimes against laws of the church.
There were also 8 "sandemænd" truth-men, super-jurors that were appointed for life by the king. These decided in cases of manslaughter, violence, rape, willful destruction of property, disputes over land, injury and crimes against the house of God, if the value was over a mark. Both the truth-men and jurors were sworn to only do what what was the most right and true thing to do.
The decision of the plurality of the truth-men were binding unless the most prominent locals and the local bishop were against the verdict.
Duels were most likely never used as a way of resolving a criminal case. There were, however, in pre-Christian and early Christian times other spectacular ways: "Jernbyrd" - carrying iron - where the accused had to carry a glowing piece of iron in their hand for several steps - or had to walk on glowing iron. If the accused was unharmed, he was innocent of the crime.
This went out of fashion relatively quickly, but instead the Oath became evidence again as it had been in ancient times. But it wasn't enough that a man swore he didn't do it. He had to produce 11 men of good reputation that would confirm the accused's truthfullness. Thus, your reputation mattered more than anything else when you were under trial.
The Law wasn't really aimed at punishing the criminals as much as they were about compensating for the crimes. The idea of imprisonment was unheard of and only used to contain the accused before the trial. As it had been the custom in ancient times, most crimes were sanctioned with fines, but claiming those fines yourself - being a vigilante - was strictly forbidden.
Murderers had to pay a fine of 40 Marks to the king and 40 Marks to the kin of the victim. Only a few crimes were so vile fines weren't enough. Those crimes were high treason, highway robbery, arsony and thievery. If a thief were caught red-handed the things he had stolen was tied to him and he was placed before the sheriff who would hang him without trial if the thief had stolen for more than half a mark. But only the sheriff was allowed to execute him. For the other vile crimes the punishment was banishment as outlaws, but the criminals were usually given some time to collect their belongings and to arrange their journey out of the country. If they were seen again, however, anybody was free to kill them.
Though it seems thievery was punished very harshly, the laws were also lenient in other cases. A traveller were free to take grains from the fields to feed his horse, for instance.
If anybody disagreed with the judgement of the shire parliament, they could take the case to the Land parliament, the ting of the realm. Later a royal parliament was created where the king himself or one of his civil servants precided and gave judgement. But that was many years later.