http://www.iphoneatlas.com/2008/08/18/iphone-os-202-fix-for-apps-crashing-not-launching-and-missing-music/
Try a restart first by holding both the home and hold switch buttons down at the same time for approx. 10 seconds. The screen flashes, and wait (awhile) for the startup logo to change to the standard “standby screen”; if that doesn’t do it, then:
Unfortunately if your iPhone is in an endless loop, you will need to restore it back to factory settings; any unsaved/un-backed up apps and media will be wiped. Also, if your iPhone is jailbroken or unlocked, you may be looking at an extensive set of instructions to re-jailbreak it. If it is unlocked for a carrier other than AT&T, then you probably want to research the best way to restore the iPhone…a standard restore through iTunes may brick an otherwise functional unlocked phone.
Use the next instructions at your own risk; if your iPhone is not unlocked or jailbroken, it should go smoothly…FYI
To restore a frozen iPhone, launch iTunes, but do not connect the phone to the dock/cable yet.
Next, you will need to put the phone in recovery mode; first, hold down both the home button and the hold switch until the phone restarts; keep holding the buttons down (don’t release) until the white logo turns off and screen goes blank;
Next, release both buttons, then press and hold only the home button and while continuing to hold, connect it to the dock/cable; iTunes will then give you the prompt “iTunes has detected an iPhone in Recovery Mode; proceed?” press OK to continue. iTunes will then download the latest firmware (2.0.2) and install it. This takes awhile depending on your internet connection.
Folllow the screen prompts until the firmware is successfully reinstalled. After that you can proceed to re-sync data, set up your email, and re-install your apps (if you have any).
If you’re running an older firmware (1.1.4 for instance), doing this restore will wipe the old firmware and update to 2.0.2 (the latest version). Just a forewarning.