How Do I Force Quit An iPhone App?
With the iPhone 4, make sure the frozen app is in the foreground of your phone. Hold the sleep/wake button at the top of your iPhone until the Slide to Power Off screen appears. After releasing the sleep/wake button, hold down the Home button for about 10 seconds. If you have done this correctly your screen will flash and you will be returned to the Home screen.
You can also quit an application at any time by removing it from the Recents List. In iOS 4, double-tap the Home button to bring up the Recents List. Then hold down on whichever app you want to quit. After a second, the icons will all start shaking. Tap the red minus icon to quit that application.