As an example, how would a peasant in feudal England learn about the more intricate laws that applied to them? Would it just be by the spoken word? And if so were they often left unaware of laws? Was ignorance of the law a justification for breaking it?
Using your example of medieval England, peasants would have been covered by the common law of wherever they lived. Each county would have a court usually composed of a sheriff, priest or bishop of some kind, and later a jury. Laws and punishments were handed out based on the traditions of the county. If a peasant had a question of law they could ask their local clergy or sheriff. There generally wasn't a written code available to most people to look at or for the judges to reference. There might be a collection of older written judgements from local judges to refer back to somewhere, but how well recorded and well maintained it was would vary.
As to ignorance of the law I can't say authoritatively, but punishments were very often based on the circumstances to the specifics of the crime, and pardons were a big part of common law systems. Many crimes like rape or murder had tough mandated sentences including death, but were rarely carried out thanks to pardons. The pardon served to reinforce the power of the nobility and allow the law to be harsh but flexible.
Henry II began the tradition of circuit judges, juries, and codified most of the common law at a high level, while doing away with what he felt were the most arbitrary rules. Even with codified laws, the circuit judges were typically bound by earlier rulings and local custom as long as they did not violate Henry's laws. It would take a long time for centralized legislative bodies to exert control on laws. It really wasn't until the 1760's when Blackstone wrote his Commentaries on English Common law that a single code of English laws was available for the every day person to read.
Though it is approaching 250 years old, I still recommend you read Blackstone's Commentaries for an easy to read history of English Common Law. It explores its origins from Jewish and Roman laws through the 1760s. A word of caution, Blackstone is a huge noble apologist and tries to justify unfair laws, so read it with a discerning eye. You can find copies of the original for free on Google Books, or annotated editions in a local library.
Well, how do we learn about most laws today? Do American kids know to start each new grade of primary school because they've read statutes for themselves, or because their parents shepherd them to the bus stop? Do the parents know to send their kids because they've read the laws firsthand, or because it's what everyone does and you "just know" things like that?
Besides oral tradition and observation, a big way that even peasants learned about civil and Church law in the later Middle Ages was actually through sermons. Because sermons could function as distributions of news as well as religious teaching--they were big public events in the later Middle Ages--preachers could and would announce major new laws.
Certainly canon (Church) law--which in the Middle Ages encompassed some of what we would consider civil law today, in particular anything related to sex and marriage--was taught through sermons and, eventually, through the sacrament of confession. Manuals for confessors give long, long lists of sample questions for the priest to ask the penitent, basically laundry lists of possible sins. That's a great way to teach people that a certain behavior is against canon law. It also suggests that ignorance was no excuse. According to the text, the priest is not to be concerned with whether the kid making his first confession knew that chucking a snowball at someone is wrong; he's concerned with whether the kid actually chucked the snowball.
People could and did plead ignorance, of course, and the court records I've looked at from medieval and Reformation Germany show that officials often took that into account as a mitigating factor when handing down punishment.
In Iceland at the yearly Alþhingi. there was the office of Law Speaker. This office held no power really, just the honor of being wise enough to know the law.
The law speaker would hold this position for three years, reciting one third of the law each year.
In addition to this those well versed in the law, usually wise men or Góði (those who held a goðord, they would settle disputes between their followers, and their followers would offer them support and vice versa). It was seen as dishonorable to charge for such legal advice.
Tl;dr- In medieval Iceland the law would be known by few versed in it, most of these people were chieftains (Goði), or the Lawspeker at the yearly national assembly.
(This is from a class I'm taking on Medieval Icelandic sagas, we learned about the legal system to supplement our readings, especially for Njál's saga)