Welcome to the Apple Support Communities
Correct. After installing the hard drive, you have to reinstall OS X. If you are using OS X Lion or Mountain Lion and you have a Mid 2010 or newer iMac, you can start using Internet Recovery, holding Command, Option (Alt) and R keys while your computer is starting, so you will just have to select the option to restore a Time Machine backup and you won't have to reinstall OS X. The same if you are using the Mac OS X version which came with the computer or if you have the DVD of the OS X version you have.
The process to install a new hard drive on a iMac is difficult and you must do it only if you know what you are doing. If you don't want to replace the hard disk yourself, take your computer to an Apple Store or reseller
First of all, after getting your computer again, turn it on and check if OS X is installed. If it's installed, follow the steps on the screen, because OS X should ask you to restore a backup.
If it's not installed, you have to install Snow Leopard with the DVDs which came with your computer. Then, after installing Snow Leopard, open > Software Update, and download 10.6.8. After that, upgrade to Mountain Lion, and finally, restore the backup with Migration Assistant. As you can see, the process is much more long, because the Late 2009 iMac hasn't got Internet Recovery and Time Machine backups aren't bootable, so restore is difficult