Many times it's a good idea to clean up threads that are rusty or damaged. If you don't know what thread size, you will need to use a Thread Gauge. A thread gauge is a template of the thread size. Each thread size has a separate thread gauge. You just keep trying different gauges till one fits the threads and then read the size off the gauge. Once you know what the thread size is, simply pick the right diameter Tap or Die and run them into the hole or over the bolt. This will make assembly much easier. The only problem is this. If the bolt or nut was over torqued, the threads may be distorted. When you re-cut them you remove a bit of the thread, making it weaker. There's not much you can do about this short of replacing the nut, bolt, or part.
You can also clean up male threads with a Thread File. You can also use a small triangular file. Threads can also be damaged by the screw end of a gear puller as you pull off a gear or by hammering on a threaded shaft, like an axle. If you must hammer a threaded end of a shaft put the nut back on and screw it down flush with the end of the shaft. This will protect the threads.
If you have stripped out female threads sometimes you can go to the next biggest tap and retap the threads and use a slightly bigger bolt. An example would be those little 6mm bolts that hold so many different cylinder head covers and side covers on. They always seem to strip out. If you retap the stripped out hole with a 1/4-20 tap and use a 1/4-20 bolt, it will usually hold just fine. The only other way to fix stripped threads is to drill out the hole much bigger and install a new set of steel threads. There are lots of different Thread Repair kits out on the market for this. They all have advantages and disadvantages. If they are put into aluminum, the threads will be stronger then the aluminum threads they replace, but they tend to back out. Also, there must be enough metal around the old, stripped out threads to support the new steel threads. Many times there just isn't enough aluminum to support the new threads.
My thanks to Flanders Co. for letting me use this chart from their catalog.
If you want the Tap/Drill chart on the right as a PDF File, Here it is
You can add more threads to a threaded bolt if needed but it is usually a better idea to go buy a bolt with the extra threads already rolled on. This is because they are stronger and if you have to add more then 1/2" or so of thread the die tends to cut off center. This means one side of the bolt has deeper cut threads then the other... not good.
When you cut threads with a tap or a die, turn it about 1/4 turn to cut the threads and then turn in the opposite direction to let the chips of steel, cut from the bolt, fall out. If you don't, the tap or die will bind in the cut and possibly break. Trying to get a broken tap out is VERY difficult. Using thread cutting oil will help you make good threads too.
If you have to cut new threads and don't want the chips to fall inside the hole, like when you rethread a stripped oil drain plug hole, put grease on the tap and clean the tap several times as you cut the threads. The grease will hold the chips on the tap.
Check this out. I have a friend, he has a daughter, she marries a Dope. Dope buys a new Yamaha four stroke dirt bike. Dope tells Father he needs to change his oil. Father-in-law, who is storing bike for dope-in-law tells him "No problem, I'll do it for you." No says Dope. Father-in-laws' not smart enough to do it. Dope will do it. Dope stripes out threads on oil drain hole. All of a sudden Father-in-law is not so stupid anymore. Dope wants him to fix it. Smart Father-in-law brings it to me. I'm able to tap it out, next size up, using the grease trick, and it holds the manufacturers recommended torque... barely. There was no meat at all around that hole. He came very close to paying $1000.00, plus labor, to put in a new set of crankcases. Moral? Use a torque wrench on those oil drain bolts and listen to your Father-in-law.
You will need a whole set of Metric and Standard Taps and Dies. Get the biggest kit you can afford. Sooner or later you will use them all.