At right, illustrations show the operation of a standard pin tumbler lock. When you insert your key, the key raises the pins to the point where the division between the top pins and the bottom pins aligns with the division between the plug and the bible of the cylinder, allowing the plug to turn.
Sometimes dust and dirt collect inside the lock cylinder. When that happens the dirt can cause the pins to stick in a partially raised position, preventing the plug from turning. In most cases a spritz of dry lubricant will be sufficient to free up the plug and allow you to open your door. Simply spray the lubricant into the keyway and insert the key a few times to work the lubricant into the mechanism. If this method does not work you may need to use a more solvent-based lubricant like WD-40 to loosen the dirt. Locks exposed to the elements sometimes collect a lot of dirt.
If your key will only go in part way, this could still be the same problem, or there may be an obstruction in the keyway. Illumination of the keyway reveals that the bottom pins hang down into the keyway. In the event that lubricating the lock is ineffective, slide a thin piece of wire into the lock along the bottom of the keyway, avoiding the pins, and feel for an obstruction. If the piece of wire will not go in as far as the length of the blade of your key, there may be an obstruction present. At this point you might want to call a locksmith, however, you can gently work your way past the pins and try to go over the obstruction in order to try to coax it out. This process can take a lot of patience and skill, and it is possible to make the problem worse if you are heavy handed with the pins.Should lubrication fail to free up your lock and you can find no obstruction, your lock may have a more serious malfunction, such as a pin chamber worn enough to allow a pin to get stuck at an angle, or a corroded pin that is frozen in place and will not budge no matter what. In these cases you need a professional to gain entry for you and repair your lock. If you succeed in freeing up your lock but find that the problem is reoccurring with increasing frequency, it’s probably time for you to replace your cylinder.