Should your iPhone ever become unresponsive or frozen, there's a quick fix to get it back in working order.
To perform a restart, simply hold the lock and home buttons down simultaneously for about 10 seconds. This will force restart the iPhone.
The iPhone will restart and come back up in working order. You will not lose any of your data. As always, it's recommended to keep your iPhone up-to-date.
You can install software updates wirelessly if running iOS 5 or later. Simply visit the Settings menu. Tap 'General'.
Then tap 'Software Update'.
iOS will check to see if any software updates are available from Apple. Download and install if there are to get the latest bug fixes and enhancements.