Edit/Update: Modern releases of OS X (Mountain Lion and particularly Mavericks) treat memory much differently. I'm leaving this post as-is for historical reasons, but if you're running Mavericks you'll see things pretty differently.
I have been a linux user for a few years, and I recently (6 months ago) switched to a MacBook. One of the reasons I originally switched from Windows to Linux was resource efficiency. There were others, but this is the one that leads to this discussion. A couple of weeks after I got my MacBook, I was working one day on a programming project for school with nothing open but iTerm and a couple of gvim windows. I happened to look at a resource monitor widget I had in my Dashboard, and was immediately concerned that I was only showing around 100 Mb free RAM. Concerned that I had some kind of memory leak going on I started digging around to find out where the "bug" was. It turns out that the bug was in my understanding of how OSX uses--and labels--memory. A friend of mine (Quinn) helped illuminate some of this for me. So here it is.
If you open the Activity Monitor (found in utilities) and select the "System Memory" tab at the bottom, you'll see something that looks roughly like this:
OSX labels physical memory (RAM) as follows: Wired, Active, Inactive, and Free.
Wired memory is used by the OS and is pretty much untouchable. Another application can't "borrow" wired memory.
Active memory is what is currently in use by running applications. Note that thanks to the splendors of virtual memory, all of the memory needed by an application isn't necessarily contained here. If you look at a running process in the Activity Monitor list, you'll see a column for Real and a column for Virtual Memory. Since we are talking about the amount of RAM in use, we won't worry about virtual memory for the moment. If there is no inactive, or free memory, active memory can be used by other applications, but this causes the OS to write the current state of the active memory being traded to its owner's virtual memory pages on disk before granting the memory to another application.
Inactive memory is memory that has recently been used by an application that is no longer running. OSX keeps track of what this is and what it belonged to because of the idea of temporal locality, the idea being that if you opened an application you are somewhat likely to do so again and if the memory is still labeled, the application can start very quickly. In the absence of sufficient free memory, inactive memory will be reclaimed by another running application that needs memory.
Free memory is just that, free. Nothing has a claim on it, and it's up for grabs for any application that needs it.
As you can see from my screen-shot image above, I tend to run with around 100-200 Mb free, between 150 and 300 Mb wired, and the rest split between active and inactive. What does this memory labeling have to do with how fast or slow the machine runs? Simple. When you log in, OSX claims the memory it needs to do all of its chores. This is wired. Other applications claim a smallish chunk of active memory as they are opened. Most applications that need to keep track of any kind of history or user data gradually use up more memory the longer they are open. Every now and then an application will need to use some part of its memory that it doesn't use frequently and OSX has to get this from disk and place it in that application's active memory allocation. All of these things can slow down a system. Also, virtualization applications such as Parallels or VMWare's Fusion require a large chunk of memory for the virtual machine that gets marked as wired.
The main thing you want to be aware of is not necessarily how much memory you have marked as free, but how much wired, active, and inactive memory you have and how often OSX has to swap memory pages in from or out to disk (Page ins/outs in the Activity Monitor). For example, my MacBook (which has 1 Gb of RAM) is almost always very responsive, except when I'm running anything in a virtual machine. When I start up Windows (which happens as rarely as possible), Parallels grabs its virtual machine memory and my usage graph looks like this:
You'll notice that wired has more than doubled in size, there is significantly less inactive memory, and next to none free. Page ins/outs are ok. "Ins" has a pretty high count from a human standpoint, but it's no big deal. "Outs" is still pretty low and my system is still fairly responsive. However, if I then try to run lots of other applications, I run into problems.Just opening Firefox caused the "Outs" to nearly double almost instantly. Inactive memory has gone down even more, and my system is noticeably less responsive. Continuing on this trend leads to a condition where "Ins" and "Outs" are nearly equal, and climbing fast. When this happens, OSX is spending all its time shuttling memory in and out of the virtual memory pages on disk, and doesn't have time to do much else. Similarly, your running applications are all waiting on OSX to swap memory to and from disk, and take much longer to do what you want them to do. This is bad. Closing the memory hogs in a condition like this will lead to almost instantaneous relief.
In this case, you'll notice that closing Parallels immediately caused a huge leap in free memory, and a marked decrease in active. This is sort of an isolated case in that the memory that was previously wired for the virtual machine is now free. In a normal case, closing applications like Photoshop, Office programs, etc. will cause a slower increase in free memory and a more immediate increase in inactive memory, with an additional decrease to active. It will take a little while for your system to get "balanced" again, and the more applications you close, the faster this will happen. You'll notice that in the time it took me to shut down my windows system running in Parallels, close Parallels, and take another screen-shot that page "Outs" increased by 9 times, and by proportion were rapidly gaining on page "Ins".
The moral of the story is: If you happen to look at Activity Monitor or some other system resource monitor and notice that you only have about 10-15% of RAM free, don't worry about it unless your system is noticeably unresponsive. This is not to say that some third party applications don't have memory leaks, but that's a topic for another day.