Unlocking an iPhone 5 typically means one of two things: resetting a forgotten passcode or removing a carrier lock to use it on a different network.
Sign in with your Apple ID, select your iPhone 5, and click .
If you're locked out because of a forgotten passcode, the only official way back in is to the device. This will erase all data unless you have a backup. Using a Computer (Recovery Mode) : Turn off your iPhone 5.
On your computer, open iTunes (Windows) or Finder (Mac). Select your device and choose . Using iCloud (Remote Wipe) :
Connect your iPhone to a computer while holding the .