iOS 4's new fast app switcher interface also allows you to kill both Apple and 3rd party App Store apps that may be causing problems in the background.
To access the fast app switcher in iOS 4, double click the home button on iPhone 4 iPhone 3GS, or iPod touch G3. The interface will slide up and reveal a second dock-like set of app icons "in the background". To kill an app, tap and hold the app until the icons begin to jiggle, then tap the minus symbol (-) at the top left corner. The app will then disappear, "deleted" from the background dock (but not from your iPhone or iPod).
This force quiwill do a couple of different things depending on the type of app.