The company determined that a “small percentage” of iPhone 5 smartphones manufactured through March 2013 may have faulty power button mechanisms. The good news is that Apple has narrowed things down to a group of serial number lots, so the company knows if your phone is eligible.
The process Apple has set up is pretty straight forward. First, you check to see if your serial number is part of the group of devices that may have the problem (see source link). Then you can either take it in to an Apple store or send it in to Apple (who will provide you with a postage paid box). Apple will return your iPhone via the same method.
Apple will have 16GB iPhone 5 loaner devices available (via the Apple stores only) if you cannot be parted with your iPhone for however long it takes to make the repair. There is no cost to you either way. Of course, if your power button is having issues due obvious indicators that your iPhone mig ht have been dropped, Apple will insist you remedy that issue before any further work will be done.
The replacement program is active for the US and Canada right now, and beginning May 2nd, Apple will extend it to other countries.