With all due respect to the many very knowledgeable people who have contributed here, I think I must disagree with most of you. I have tuned and strung my fair share of guitars over the years and here is my honest opinion:

1st and most important is that the machine head be strung properly. Even crappy tuners in my experience will hold a tune pretty well as long as this is done.

Given the first thing is done, obviously the quality of the tuner is important. I personally do not believe in locking tuners. The precision of the machining in the manufacture of the worm gear mechanism is what determines how well it will hold tune. It doesn't matter if your tuner locks the string in the capstan (as most locking tuners do, pinching it in the hole), if the capstan moves because there is lash in the gear mechanism behind it. If properly strung, the string will kink at the point it passes through the capstan (the hole in the peg for the string) locking it in place. It will not slip at that point. Then I suggest no more than two coils of string around the capstan. More coils just gives more string to stretch and slip, and tuning feels more direct with less coils. Tying the various knots I see people make has the same effect, or depending on the knot, causes the string to pass through the hole at a funny angle so it doesn't really make a sharp kink towards where it coils down the capstan. That kink effectively locks the string in place there, especially once there is a coil of string below pushing against it.

Here's how I string my heads:



My guitar never goes out of tune for no reason. Also, all these other methods take more time, which as I get older, I appreciate the value of more and more.

I strongly recommend Schaller sealed full oil bath machine heads. Made in Germany to very exacting tolerances. Finest money can buy. And you will pay for them. Their gold plated machines are particularly nice, hand polished. I love the set I bought for my dreadnaught. They weight 45.6 grams each with the screw (that's heavy), and they are beatiful. This will immediately also have the effect of improving your sustain, as it effectively weights the headstock.