How does Jailbreak work?

Howdy! Newbie here, how are you all doing?

I was wondering, and I couldn't find a good answer by googling, what Jailbreaking does. I mean, I know what it does once everything is said and done and you get Cydia and all your nice shiny apple-hates-em apps. But, how does QuickPwn does the Jailbreaking, exactly? (Well not exactly exactly 'cause I probably wouldn't understand it, 😛)

I'm just curious about what goes on inside that nice devteam made .ispw and Pwnage Tool.
http://forum.theiphoneblog.com/iphone-jailbreak-central/166768-must-read-jailbreakers.html

Original thread: https://forums.imore.com/threads/how-does-jailbreak-work.167456/