If you're selling an old Mac or giving it away--or perhaps you're on the receiving end of that Mac--there's a big question: What is the best way to upgrade OS X from the Snow Leopard version (or earlier) to a more modern, Lionized version? This question is answered in detail in an excellent recent blog post by TidBits publisher Adam Engst.
Engst looked at several ways to get Mac OS X Lion (10.7) installed, a popular goal since it supports iCloud services and is usually the latest version of Mac OS X that these machines can handle. He pointed out that users of machines with the ancient OS X Tiger (10.4) or Leopard (10.5) will need to order an installer disc from Apple for $19.99. All the necessary links and process can be found in the TidBits article.
To summarize, you can sell or give away a Mac with the version of Mac OS X that came pre-installed on it. If you bought 10.6 Snow Leopard on its own, you can sell that on its own. But if you purchased your license to Lion or Mountain Lion through the Mac App Store, it is not transferable and must be removed before you sell or give the Mac away. And don't think that getting Lion on a USB drive is a workaround; Apple explicitly considers it equally as non-transferable as a Mac App Store version.
Under the fold, Engst looked at the fine print surrounding the transfer of OS X licenses for Snow Leopard, Lion, and Mountain Lion (10.8). It's interesting reading. The shift of upgrades to the Mac App Store complicates the mostly understood conditions for selling a machine.
If you're buying a new machine and considering gifting your old hardware, this post is essential reading.
A comment in the post by Steven Fisher points to an Apple Support Note on how to show hidden purchases (or hiding them) in the Mac App Store. It's a selection in View My Account.