Door key won't work properly
First of all make sure you are using the correct key and if you manage to get it open check the key again. If it works perfectly this time the deadbolt is not engaging the strike plate properly and if it still doesn't work properly try to lubricate the lock or clean it. Then spray a little bit of graphite into the lock and try the key several times.
Key turns but won't unlock it
If the door doesn't unlock when the key turns disassemble the lock so you can be sure the cam or tang is properly engaged with the bolt. If you see any broken parts replace them then reassemble the lock.
Key won't go into the lock
If the key wont go into the lock make sure the lock isn't frozen by heating the key and trying it again repeatedly. If its a new key that won't go in there may be some rougher parts that need to be filed off. To check for this burn the key lightly so it is covered in soot and try the lock again. When you take the key out file down any rough areas that will be shiny and easy to spot now.