The Auto-lock feature on your iPhone allows you to set the amount of time that elapses before the iPhone automatically locks or turns off the display. Or, you can set Auto-lock so that the iPhone never locks automatically. Your Auto-lock choices are five minutes before turning off, four minutes before, and so on, all the way down to one minute.
To change the auto-lock settings, tap the Settings icon, then the General button. Tap on the Auto-Lock option and choose your preference.
Don’t worry if the iPhone is locked. You can still get calls and text messages and adjust the volume.