Very, very few apps run in the background and the iphones os manages those that do.
Double tapping the home button pulls up the recently used apps. These apps are very likely not running in the background.
What software version are you running on your iphone?
Your iPhone 3G simply does not support multitasking, so you have no need to "turn it off" for individual applications, it's always off.
Continuing though, are you looking to quit applications as a way to regain battery life or quicken the iPhone's performance? Performance issues can be helped by updating from earlier versions of iOS like 4.0, and the like to a later version, like 4.2.1. This can be accomplished by plugging the iPhone into your Mac or PC and selecting "Update" in the iPhone's "Summary" tab in iTunes.
If it's about battery life, Apple has some great tips to extend battery life that can be found right here: