First let me start by saying that I'm not an expert, but I do read and try to understand how this stuff works. I'd definitely recommend reading some expert articles on the topic. Jerry has writted a good one, I think. That being said, I'll do my best to explain to get you started.
Android uses the same approach as Linux for RAM management (which is very different than Windows, which most people are familiar with). The Linux/Android approach says, there's no point to having free RAM; if RAM is free then it's being wasted. So Android keeps recent apps in RAM even after you close them out. This enables you to reopen apps quickly (and using less battery), not lose your state when multitasking, etc. But to prevent lag or crashes, Android will automatically free up RAM as it needs it.
For example, lets say you recently used the Browser, Angry Birds, and GMail. All those app might still be in RAM (along with your launcher and all the needed background processes, etc). This will let you get back to any of those apps quickly and using less battery. But if you open something new, lets say Maps, and Maps needs more RAM then is currently available, Android will remove old apps from RAM to free up enough memory for Maps. So basically it might kill the Browser and Angry Birds to free memory from Maps.
This is why Android phones almost always appear to be "out of RAM" because the OS is designed to keep your RAM full. The older versions of Android (pre-froyo I think) didn't do this very well, and automatic task killers were born. But now Android does a really good job of managing RAM and it's really never necessary to kill an app to free up memory. (It might be necessary to kill an app if it's locked up or causing other problems.)
I hope that made sense.