It's actually difficult to do this. The problem is that, when the OS was installed on that HDD in your old machine, it was customized for it. That is, the Install process surveyed the machine and detected all the hardware devices it contained, then made sure to install the device drivers for them. "Hardware devices" includes a whole bunch of components of your mobo like USB ports, eSATA ports, SATA ports, video chip (maybe), audio devices, etc., PLUS any PCI cards you have in the machine. If you put that HDD into a new machine, there are two kinds of mismatch. First, it has drivers for many devices not present in the new machine. More importantly, it does NOT have the device drivers for many of the devices that are part of the new machine, and so it can't use them. This often results in failure to boot.
If you have your original OS Install disk, there is a process that MIGHT work. When you first turn on the system, you place your old Install disk in the optical drive and boot from there. You watch carefully and do NOT do a normal Install. Instead you choose a Repair Install. This is supposed to detect and fix all those driver mismatches and get you running smoothly. Sometimes this works, sometimes not.
The alternative, of course, is to back up everything on some other device, then put your old HDD in the new machine, wipe it clean and do a fresh Install from the original CD. However, then you have to re-install all your applications software, and finally restore all your data files from the backup device. A long process, but sure to give you a smooth-running system.