Yep, and I bought it on ebay for $175 instead of the $250 Apple would have charged. I have it on my mid-2013 MacBook Air. I'm now protected until 2016 for $175, so definitely worth it for me. I suggest searching ebay. Make sure to pick a high feedback seller. No codes, original unopened box only. My seller even sent me the original receipt.
Yes, that's exactly how it works. You buy it in a sealed retail package, inside the package is a unique code. You go to the applecare website and register the code to your Mac's serial number. That's it.
It also means that it is a bit easier to sell; people like the idea of being able to buy a computer with a bit of Applecare still on it, and, while it doesn't add enormously to the value, it does make selling a bit easier, should one choose to go that route.