iMac fan noise can be caused by a variaty of reasons, if you have replaced the HDD recently this is the most likely cause, and HDD Fan Control is the best solution.
HDD Fan Control will make teh fan run correctly again and provide the best protection from your iMac overheating.
If after running the HDD Fan Control demo you are still hearing above avvarage fan noise its likely HDD Fan Control is working correctly and controlling the HDD Fan, but another fan has also been running fast, you can check this using a program called iStat menus.
If it is a fan other than the HDD Fan, it is most often caused by another sensor cable becoming disconnected when replacing the drive. If the optical drive fan is running fast then it is probably the Optical Drive sensor or if its the CPU or GPU Fan then its probably the LCD Sensor.
Once you have found out which of the other fans is running fast you will then want to check the sensor connections for these, this will involve opening the iMac again for this we recomend using the iFixit guide.