Most around here meet it when fiddling with softmods on original xboxes, stuff like http://www.xbox-scene.com/articles/lock-hdd.php
. If the drive (hence the lists of them which work) and motherboard controller (most USB ones apparently do not hence guides there saying you need a motherboard) supports it then you can tell it to lock itself.
You probably will not find much looking for IDE or ata or atapi or pata locking, go higher level and find IDE commands and work on from there.
is a good start, though it does not include much on locking. http://wiki.osdev.org/PCI_IDE_Controller#Commands
is also nice. http://www.retroleum.co.uk/electronics-articles/an-8-bit-ide-interface/
is good for a basic overview.
has a load of info but might well have been the high level stuff you spoke of.
It all stems from "trusted computing", though technically that is a slight aside from the security features or a superset of it, which is both fancy DRM and theoretically something a bit more special. In hard drives not much of it aims for either fault tolerance or high availability or encryption really though which means we are back to fancy DRM and ensuring little in the way of user serviceability.
is still pretty high level but does cover ATA (also SCSI and some SAS stuff, not to mention a bit on SATA as well so be careful if clicking around).
ANSI INCITS 452-2008 is referenced above and though it is of the same line as the PDFs linked I will link another version
Page 49 (internal page numbering, not PDF which would be 93 if you are going by that) has good stuff and the tables after that cover more.
If you mean how does it physically work then most halfway modern drives have a massive controller attached to the spinning rust so as to allow OS devs, hardware makers and whatnot to not have to worry about constantly checking, accounting for sector remapping and all that jazz. Said controller is often a fairly full computer when all is said and done (even SD cards have RAM and a processor these days
) and they figured the security types would want something as well. To that end the modes you found (unlocked, locked and frozen, or if you prefer the numbered states that can result from various combinations of those and password limits and power state) will all do different things with different commands. With the controller being the gatekeeper for it all then no controller on your side, no play.