What you say was true for iOS prior to 4. iOS 4 brought multitasking to iPhone and iPad. While only one app can be visible at the time, it may still run in the background (and output audio, for instance). You can easily see what I mean using the iPod app: start olaglig à song, them switch to another app. The song playback continues.

Regards
/Bjorn