This question comes up every once in a while. The short answer is "It's supposed to do that, don't worry about it, let the OS take care of itself."
The long answer: OSX (and other UNIXes, I assume) has four different RAM states, as you can see in the Activity Monitor or a utility like Top: Wired, Active, inactive, and Free.
Wired is RAM that has been permanantly reserved by the OS, and can't be swapped out to disk to make room for anything else. It's "system RAM" of sorts, mostly the kernel I believe.
Active RAM is memory that is currently in use by an application. It can be paged out temporarily if more RAM is needed for something else and there isn't enough left, but it's doing work of some sort.
Inactive RAM is what's confusing you; this is RAM that was originally reserved by an application, but isn't necessary anymore. The system keeps it ready, though, in case it's needed again--that way it doesn't have to be re-loaded. Otherwise, it can just be removed to make room for something more important.
For example, you launch an application. It loads a bunch of stuff into memory that it needs. Then you quit it. The system could just remove this stuff from memory, but instead it marks it "inactive". If you then open the application again, it doesn't need to re-load a lot of that stuff, since it's already in memory--it just gets marked active again. But if you open some other application that needs that memory, the inactive stuff gets thrown away, since it wasn't actually being used.
Free RAM is, of course, free--sitting there, waiting to do something. You could also think of it as being wasted, since there's nothing at all being stored in it, unlike inactive RAM which at least might do some good.
The bottom line is that inactive RAM is like free RAM, except it might be good for something.