I've seen 2 ways. go to a lord in a castle, and ask to speak to him. then get a pardon. (make peace). You have to pay money.
the other way is go break out one of their prisoners. +6 relation, and amazingly, no negative relation to the (former) jailer.