How does Apple fix the sleep-wake button issue on the iPhone 5? What do Apple technicians actually change when they take the iPhone 5 for repairing the sleep-wake button issue? Do they just replace the outer button or something else too? 

What parts are actually replaced with new ones?
I replaced this myself and it's very tedious and time consuming.   There is a ribbon cable in the phone that connects all of the exterior buttons/switches to the motherboard.  Usually the physical button you see from the exterior of the phone is not the problem, it's either the tiny button that button presses (attached to the end of the ribbon cable) or something with the wires themselves within the ribbon cable.

In case you're curious, here are instructions for how to do it yourself and what the inside looks like but I'd advise against doing it yourself unless you have experience with this sort of thing, a lot of time to kill, the phone is already out of warranty, and you could go without use of the device you're repairing.

The $5 cable I bought on Amazon worked for a few months but started to fail itself.  I'd recommend paying to have Apple do it.