The iPhone goes to sleep by default after it’s been inactive for a certain period of time. But what if you want to actually turn off the iPhone, not just let it sleep? Or what if you want to restart it?
To do either, start by holding down the sleep/wake button at the top right-hand corner of the iPhone for a few seconds.
This will bring up a screen asking you to run the slider across the screen to turn the phone off. If you don’t want to do this, just hit the cancel button at the bottom of the screen.
When you slide the slider to the right, a progress wheel will appear and in a second or two, the iPhone will be off.
To turn it back on again, just hold down the sleep/wake button again until the Apple icon appears on the screen and then wait for the phone to start up.
Restarting the iPhone 3GS is essentially the same process.
If a restart doesn't solve the problem you're facing, consider applying more advanced iPhone troubleshooting techniques.

