To conserve power, the iPhone and iPod touch are designed to go into sleep mode automatically if it hasn’t been used for a set period of time. The default setting is 60 seconds; the screen dims 15 seconds before this and then goes blank at 60 seconds. Once the device has gone into sleep mode, you have to press the Home button and move the slider to the right to unlock the device and use it again.
If you find yourself getting frustrated with this—having to unlock your iPhone over and over again—you might want to change the default setting. From the Home screen, go to Settings >General >Auto-Lock and set the time to 1, 2, 3, 4, or 5 Minutes. To start out, bump it up to 2 minutes and see if you’re comfortable with that.