Well, this instructable assumes for some reason you don't have access to any of these modern conveniences like graphite-in-a-spray-can, and the only graphite you happen to have with you is in pencil-form.
Items needed for this instructable:
a lock that you own, or have permission to use
a key that opens that lock
a pencil (containing graphite)
Step 1: Separate the Graphite From the Pencil Somehow.
If the pencil is one of the old fashioned wooden types, then removing the graphite takes a little more work.
I recommend using a sharp knife. Use the knife to whittle away the wood surrounding the graphite. I realize I didn't explicitly mention a knife in the "stuff you will need" section, but then I just naturally assumed you'd have some kind of cutting tool with you. Most civilized people do. What happened? Did those goons at the airport "confiscate" it? Well, uh, if you don't have a knife, I suppose you can use your teeth or a sharp rock, or something.
Anyway, keep whittling until you have a good sized chunk of graphite. How much? I dunno. You want a good-sized chunk? Maybe an inch, maybe 2 cm? That's l. r = 1 mm. Volume of the chunk is pi*r2*l = approximately 60 microliters.
Those of you using the little sticks for a 0.5 mm mechanical pencil will have to adjust the recipe a little to get the same volume of graphite. You know, use your algebra skills: find the new l based on a new r. I'll leave that as an exercise for the reader.
Of course, all you really need is a good-sized chunk.
Also try to make sure this chunk of graphite is free of little pieces of wood sticking to it. You want to put graphite in the lock, not wood.
Now at this point you might be worried because the graphite is in chunk form, not powdered, but I assure you there is no need to be worried. The powdering action happens in the next few steps.
Step 2: Stick It in the Hole.
It may be the case that the chunk of graphite is too big to slide in easily, but don't let that deter you, just force it in there anyway. A twisting motion may help. The point is to get the graphite into the lock. It doesn't matter if the graphite goes in in one piece or not because this graphite is destined to get ground into powder anyway.
Step 3: Put the Key In. Slide It in and Out.
The purpose of this step is to grind big chunks of graphite into fine powdered graphite.
Every so often try turning the key to see if the cylinder will turn. That is to say, the cylinder turning when you turn the key is what you expect to happen for a working lock when it "unlocks", as they say.
If the key meets resistance when you try to turn it, this doesn't mean you've broken your lock. It just means there are some big chucks of graphite that still need to be ground. Just keep jiggling that key around until the graphite is all ground up, er... down, into a fine powder.
Step 4: Repeat If Desired.
If it still isn't, then... uh... I dunno? Maybe you need more graphite. If so then repeat steps 1 through 3. It's sort of like they say on shampoo bottles, "Repeat if desired."