Simply learn yourself.
For Operating System

How to Reset a Forgotten Passcode for an iOS Device

Most of the iOS users (iPhone, iPad and iPod) secure their devices with passcode to prevent unauthorized access.  Forgetting your passcode can be very frustrating, the only way left to unlock your device is by restoring it and wiping all data. But you don’t need to worry! This instruction page will help you to reset a Forgotten Passcode for an iOS Device without data loss. Here are some steps need to be followed:

Note: Make sure that you have synced your device to a Mac computer earlier

Step 1: Connect your device to the PC and check for the iTunes latest version if available update it. Now turn off the device and Hold down Home and Power button of the device until iTunes logo appears on the screen.

Step 2: Open iTunes application on your Mac computer, you will receive a popup update. Hit restore.  Now, downloading of the new iOS version will be started and it will take time depending upon internet speed.

Step 3: Your device will now restart. Wait until screen comes up with hello or hola message. Now configure the device as new device. Choose Wi-Fi network, select your preference language and Enable location services.  Enter your apple ID and password to use iCloud.

Step 4:  Resetting iOS device will give you access without passcode. If you want to secure your device again, set a new passcode.