A hole in a hand-knitted sock is not the end of the sock. Done properly, a darned heel outlasts the original knitting, because a woven darn is denser and more abrasion-resistant than the fabric around it.
Why darning works
Knitted fabric is a series of loops; when one breaks, its neighbours unravel. A darn replaces the missing loops with a woven grid that does not unravel, anchored into sound fabric on all four sides. The result is a patch that is slightly stiffer and considerably tougher than what surrounds it.
This is also why a darn in the wrong place is a problem. If you anchor into fabric that is already thin, the repair will tear out at the anchor rather than at the hole, taking more with it.
The method
Stretch the hole over a darning mushroom so the fabric is under the same tension it will be under on a foot. Work a ring of running stitches around the hole, outside the thin area, to give yourself a stable frame. Then work vertical threads across the gap, and weave horizontally over and under them, leaving a small loop at each edge so the darn can flex.
Match the yarn weight, not the colour. Sock yarn for sock yarn, even if the shade is slightly off — a thicker yarn makes a lump that rubs, and a thinner one leaves the repair weak. If the hole is larger than a thumbnail, knit a patch and graft it in instead.
Finishing, and the mistake everyone makes
Finish on the inside, weave in the ends over at least three centimetres, and do not knot. Then wear the sock around the house for an evening before you decide the tension is right. A darn that feels fine flat can pull as soon as it is on a foot.
The mistake almost everyone makes is darning too tightly. A dense, flat darn has no give, so it will not stretch with the sock: it either tears out at the edge or it pulls and distorts the whole heel. Loops at the selvedge are not sloppiness, they are the flex.
The reward
A pair of socks darned three times, in three different colours, is a better object than a new pair. It fits your foot exactly, it carries a small record of every winter it has survived, and it cost you nothing but an evening.