In most cases, the "iPhone is Disabled" error is timed and disappears automatically after a certain amount of time, often as little as a minute. At this point, enter the phone passcode to unlock the device. If the error continues to reappear, due to repeatedly entering an incorrect error code, it may be necessary to erase the phone's data and restore a backup using iTunes, iCloud or recovery mode.
If the device has already been synced with a computer with iTunes, connect the iPhone to that computer and open iTunes. ITunes should automatically start backing up the device. If it does not, press the Back Up Now button. After this click Restore Backup. Once the set up screen appears on the iPhone, tap Restore from iTunes Backup and select the most relevant backup.
If the device has been set up with Find My iPhone, it can also be reset using iCloud. Navigate to iCloud.com/Find, sign in with the Apple ID associated with the device, select the iPhone, and click Erase. Following this, the device can either be restored from a backup or set up as new. This process does not create a new backup of the device, so make sure a relevant backup has previously been created before proceeding.
If the iPhone has never been synced with iTunes and has not been set up with Find My iPhone, use recovery mode. Connect the device to a computer with iTunes installed, and force restart the iPhone by pressing and holding the power and home buttons simultaneously. When prompted on the computer screen, choose the Restore option. This erases all data on the iPhone.