Certain apps perform functions even while not the foremost application.
For instance, Pandora radio plays audio even in the background. Some media sharing apps will continue to upload or download media in the background, and Safari will continue loading a page in the background.
All other functions and apps will simply remain in the RAM, not using CPU, necessarily, and thus not draining battery.
It works almost exactly as a Mac works. After you close all windows in some Mac applications, the app is still loaded in RAM, just not running. Makes 'em faster, yano?
I do notice that intensive apps such as YouTube will hoard all of the RAM and after watching a video or two, Safari and some other apps will have to re-load data to RAM.
Just quit apps you're not using, simple.