Firstly, of course you won't use this information to perform any sort of illegal break-ins. This post is intended for the majority of you who will run into the unfortunate scenario of losing a key.
If you're in the second camp, and you happen to be lucky enough to have a lock that uses a barrel-and-pin style lock, we've got you covered.
Wikihow breaks down how a standard lock with a barrel and pins works, "The barrel is the chamber you put the key into. The pins are small metal cylinders that sink into the barrel, holding it in place until a key (or your pick) pushes them up and out of the way. The pins are cut in half, and when the halfway mark lines up with the barrel you can turn the lock. Your job, as a lock picker, is to manually push up each of the pins into the correct position, slowly turning the barrel so that they can't call back into place. Once you've got all the pins out of the way, the barrel will turn freely and the door will be open."
Check out the step-by-step video below to learn everything you need to know.