system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does a master key work?

I know how regular locks and keys work, but I don't understand how one key could work for multiple locks. Also, pictures/diagrams would be appreciated. I'm a visual learner.
gpt
a lock has sets of pins in it, and those are moved by the teeth in a key.  the different heights of the teeth move gaps in the pins so that the lock barrel can be turned.  in a set of locks with a master key, there is a second set of gaps in the pins, for the master key.  this allows it to open any of the locks it is set to.