How are people protected from violence in a libertarian society?

These do not directly answer your question, but they will be immensely helpful to you in understanding law and its role in society:

What Law Is

A Praxeological Account of Law

Crusoe, Morality, and Axiomatic Libertarianism