Fist of all, you will need a mainspring vise to remove your mainspring. If you are working on a flintlock, you will need the same vise to remove the frizzen spring. These springs are fragile and if you try to take them out with a pair of pliers or vise grips, you stand a chance of breaking them. Okay, lets assume that you have the needed vise and know how to disassemble your lock. Most likely it will have a fly in the tumbler. It is tiny and you must be most careful not to loose it. When you have your lock apart, examine the lock plate for signs of rubbing. If you see any such signs, these are places that need to be polished. I use a Dremmel tool with a polishing wheel and some polishing compound such as jeweler's rouge to do the job. Polish it nice and bright and then polish the part that is rubbing. I would tell you to dress the part that is rubbing but unless you are very knowledgeable about what you are doing, you could cut through the case hardening (if the part has been case hardened) and that would just make the problem worse. So, just polish the part nice and bright. Once you have these spots polished, you will need to polish the trigger seer and the full cock notch in the tumbler. This is a very ticklish job and if you don't get it exactly right you can cause your gun to slip out of full cock and fire unexpectedly. What you have to do is use a fine ceramic or Arkansas stone with a very square edge that will allow you to get into the notch and just polish it but not change any angle. Carefully polish the full cock notch. You will likely need some sort of magnifying lens to see what you are doing and to make sure that you do not make any change to the angle of the notch. Once you have it polished, you can polish the trigger seer. Again, you must not change the angle. Just carefully polish it. Next, examine the tumbler screw. The one that the tumbler rotates on. You can carefully polish it so the tumbler moves smoothly when you rotate it. Examine the underside of the bridle for rub marks and polish it if you see any. When all of these places have been polished, thoroughly clean off all polishing compound, reassemble your lock. Oh, if it is a flintlock, you will need to polish the tip of the frizzen where it rides on the frizzen spring. I would not do anything to the spring but buff it with some jeweler's rouge on your Dremmel tool. Just buff the part where it rubs on the frizzen. Now, with your lock reassembled, you can apply a lubricant to the moving parts. Do not use grease because it just attracts dirt and crud. Use something like 3 in 1 oil or a gun oil. LIGHTLY oil the moving parts and replace your lock in your gun. Done correctly, you should notice a difference in the smoothness of your lock. When you replace your lock in the stock, do not over tighten the lock bolt as that can cause the operating parts of your lock to rub on the inside of the lock mortise and cause problems. The lock bolt needs to just be snug, not TIGHT.
I did not address any changes in the geometery of your lock because that is much more advanced work than you may want to do or have the tools and skills to do. In fact, I do not know anything about how to do it correctly so I will leave that up to someone else to tell you how to do such things as bending your hammer or cock. It can be done and, as I understand it, is not all that hard if you have a torch to heat it with. But that is for someone else to tell you about.