While it may sound pretty weird, getting locked out of an iPhone is one hell of a problem. People either forget their passcodes or sometimes inadvertently make several unlocking attempts, ultimately ending up with a locked unit for thousands of minutes. Now, in either of the cases, restoring the device is your only way to get access back. Here's how you can do it. For any device, be it an iPhone or not, having your data backed up is the first basic rule. If you have a cloud-based data backup ready (iCloud\/iTunes in this case), you can easily go ahead with the restoration process. However, if that's not the case and you're locked out, you will lose all content on the phone including photos, videos, documents. Now, connect the locked iPhone to your PC, open iTunes on it, and force restart the device to open it in the recovery mode. From there, your iTunes will generate a prompt saying, There is a problem with the iPhone that requires to be updated or restored. Click on the Restore button to begin the process, which should be completed in a few minutes. Once the restoration is complete, unplug the iPhone and set it up like a new one by connecting to Wi-Fi, setting up a fresh passcode and Touch ID\/Face ID. As you continue with the setup, the device will prompt you to restore from the iCloud; click on this and sign in with your Apple ID to restore all backed-up data from iCloud. While the steps given here should restore access to your iPhone, we recommend contacting Apple if you get an error or the device doesn't let you in. There's nothing more you can do to restore access to the device, and only Apple's service experts can help you out. You can reach out online or by visiting the Apple Store in person.