How to Lock and Unlock Your iPhone
You can lock your iPhone so its touch screen doesn't work. This prevents the iPhone from dialing phone numbers, playing music, or doing anything else when it's in your pocket, rubbing against your pants, or in your purse making contact with keys and other stuff. Apple makes locking your iPhone a snap.
In fact, you don’t need to do anything to lock the iPhone; it happens automatically, if you don't touch the screen for one minute.
Can’t wait that long? To lock the iPhone immediately, press the Sleep/Wake button. To unlock it, press the Sleep/Wake button again. Or, press the Home button on the front of the screen. Either way, the on-screen slider appears, but your iPhone doesn’t actually awaken until you drag the slider to the right with your finger.