More recent iOS devices like Apple’s iPhone 3GS, iPad, and the third-generation iPod touch support the fast app switching feature in iOS4. This means the system never really closes apps. It just suspends them, a feature that leads to fast switching.
But sometimes, in case of an app freeze or error, you really do want to close a suspended app. So double-click the Home button to bring up your suspended apps and find the app you want to close. Touch and hold the icon until it wiggles. Then tap the red circle with the minus sign.