Door locks contain somewhat complicated mechanisms that can jam for many reasons. They are affected by temperature, and may not work properly in freezing weather. Moreover, moisture may cause the tumblers to rust and become stuck. If the lock mechanism is working, but it is still hard to turn the key, the deadbolt may be out of alignment with the strike plate on the jamb. None of these problems are serious, and they can all be fixed with a few hand tools and some lubricant.

...
Door locks can jam for many reasons

Step 1

Make sure you are using the right key. If it is a cold day, and the key won't go into the lock or won't turn, heat it by blowing on it and try again. If that doesn't work, or you can't get the lock to turn in warm weather, the key may have burrs, especially if it is new one. Spread a little soot on the key and insert it in the lock and remove it. Any parts of the key that don't have soot are rubbing against the mechanism, so grind these down with a file.

Step 2

Spray thread lubricant into the keyhole if the deadbolt is difficult to turn when the door is open. This will loosen deposits on the metal parts that are preventing the key from turning. You can also squeeze a little graphite into the hole, or dust some on the key. Then insert the key and turn it a few times to work the graphite into the mechanism.

Step 3

Check the alignment of the deadbolt against the strike on the jamb if the lock is difficult to turn when the door is closed, or the door doesn't lock at all. Use a file to widen the hole on the strike, or remove the strike with a screwdriver and re-position it on the jamb. You may have to widen the mortise in the wood under the strike when if you re-position it. Use a chisel to do this.

Step 4

Remove the cover plate and tighten the set-screws holding the lockset together if it moves when you turn the key. If either of the screws is broken, replace it.

Step 5

Disassemble and remove the entire lockset if the key is still hard to turn. Spray the entire mechanism with spray lubricant and wait for at least 10 minutes before you re-install it.