Here's the IFIXIT guide to install a replacement drive: reemplacamiento del disco duro iMac Intel 21.5" EMC 2389
Your systems SATA port is only SATA II (3.0 Gb/s) So sadly you can't use most of the Western Digital drives as they are FIXED SATA III (6.0 Gb/s) drives as WD no longer makes SATA II drives.
So what to do?? Well you can still use an AUTO SATA port sense drive! These drives have the ability to match to the systems SATA port speed. As an example the Seagate FireCuda drives. Here you can see the SATA Transfer Rates Supported (Gb/s) line lists all three SATA speeds! 6.0/3.0/1.5. Unlike a standard HD the FireCuda is a SSHD so you gain some zip over a standard HD!
OK so we've found a workable drive now we still have the onboard SMC thermal sensor to deal with.
Apple leveraged a diagnostic sensor the manufactures had on the drives accessing it though the AUX header. As Apple sourced drives from a few different vendors (3) they ended up having different sensor cables as the different makers used different pins (no standard). Todays drives are different so one can't depend on the cable to even work with the same drive maker anyways so we need to find a better approach.
As it turns out OWC has the answer here! OWC In-line Digital Thermal Sensor for iMac 2009-2010 Hard Drive Upgrade which allows us to bypass the onboard sensor to an externally mounted unit which works across any drive you might use.
So the bottom line here is: You'll need the Seagate drive (Auto SATA port sense) & OWC in-line thermal sensor!