By default, if you enter your passcode wrong multiple times, your iPhone will be shut down and you have to connect it to the iTunes. But you may also want to wipe your data if someone tries to enter a passcode on your iPhone randomly for 10 times. To do so, and enable erase data after 10 failed passcode attempts on iPhone, iPad and iPod Touch devices, do as follows:
1. Open the Settings application
2. Tap to open the Passcode settings
3. Enter your Passcode to open the Settings (If you haven't already defined a passcode, make sure to define one)
4. Scroll down to the Erase Data option and make sure to toggle it ON
5. From now on, if you or someone else enters the passcode wrong for 10 times, ALL YOUR DATA WILL BE ERASED automatically and THERE IS NO GOING BACK. So make sure you use this feature wisely and you always have a fresh backup.