If a user enters an Apple device passcode incorrectly six times in a row, he must wait one minute before guessing again. On subsequent consecutive failures, this wait time increases. After the tenth incorrect guess, the Apple device becomes disabled and locks the user out.
After the tenth incorrect passcode attempt, the user should connect his Apple device to iTunes on an authorized computer and try to enter the passcode again. If the user completely forgets his passcode, then the device remains locked indefinitely.
If the user made a device backup in iTunes prior to forgetting the passcode, he can restore his device to the previous backed-up state. In a scenario where no backup exists, then there is no supported way to continue using the phone unless the user erases all device data through the device's built-in recovery mode.