Affected devices were sold between September 2012 and January 2013 and are within a specific serial number range, Apple says. You can check your serial number on Apple's site to see if your phone qualifies for a free battery replacement.
If you have an affected device you'll have the choice to replace your battery free of charge at the Apple Store, an Apple authorized service provider, or you can send it off to Apple Technical Support.
Before bringing your phone in, Apple advises you to back up your data to iTunes or iCloud, turn off Find my iPhone, and do a factory reset. You can do that by navigating to Settings > General > Reset > Erase all Content and Settings.
Apple won't replace broken screens, cracked backs, or other physical problems free of charge. But the company also won't replace the battery for free until any damage that impairs battery replacement is fixed—including cracked screens.
Once your battery is replaced, Apple will guarantee the battery for two years after the device's initial retail sale or March 1, 2015, whichever is longer. The battery replacement will not extend your iPhone 5 warranty.
Apple's battery replacement program began on Friday, August 22 for iPhone users in the U.S. and China. Other countries will start seeing a replacement program this upcoming Friday, August 29.
But if your phone is getting close to its second birthday anyway, it might be time to ditch your handset for something newer. Rumor has it the iPhone 6 is set for a debut in the coming weeks.