Apple says it’s contacting affected iMac owners who provided a valid email address when registering their iMacs, but if you think you system qualifies for the replacement, you can enter your iMac’s serial number on the replacement program page. (Apple explains how to find your serial number in a support document.)
If your iMac requires a replacement drive, you have the option to set up a Genius Bar appointment in an Apple retail store, visit an Apple authorized service provider, or contact Apple technical support for local service options.
Apple will replace a drive until July 23, 2012, but notes that the program doesn’t extend the standard warranty coverage of your iMac. And of course, you’re responsible for backing up the contents of your current hard drive, since Apple won’t provide that service.