Disk firmware follows sectors which are hard to write, flags them as "current pending sector". Then reallocates that sectors data to one of the reserves when it has time and increases "Reallocated Sector Count", and if it deems the sector dead or unusable, it's get blacklisted and "Offline Uncorrectable" count is increased as well, from what I remember.
This is all transparent from the host, maybe an occasional "wait a little, I'm kinda busy" signal to the controller. Same for flash, but it's way faster and more transparent, since the real map inside the flash controller is never linear, anyway.