OP, your posts are a bit unclear. I suspect that you plugged your old HDD into an internal SATA port of the new computer, plus a power connector to the drive, and then tried to boot up from that old drive. IF that is what you did, it is normal for this to FAIL!
Any HDD that contains a bootable version of Windows on it is customized to fit the specific machine it was first installed on. The customization is done by the Install process. It ensures that the device drivers needed for all the devices in the host machine are installed, but not any others. If you then move that drive to a different machine there are mismatches - from a few to MANY - because the new machine has different hardware devices built in. The "devices" are not just add-on things like cards in PCI slots and printers plugged into the back. The motherboard itself has many devices that control other things.
Depending on just how much mismatch there is, it MAY be possible for you to get the old HDD to work as a boot drive for the new machine. BUT before you do, consider carefully this question: Do you actually want that old HDD to be the boot drive in the new machine? Or, do you want to have a different HDD with its own new version of Windows installed on it as the boot drive? Then you could use the old drive as simply a data storage device so you can access its old files. Answer that before proceeding.
Now, IF you do want to use the old HDD as the new machine's boot unit, you can try this. It works in many cases, but not always. To do it, you will need a Windows Install CD for the same version of windows already on the old HDD. For example, if you were using Win 7 on the old machine, you need a Win 7 Install CD.
Install the old HDD internally. Put the Windows Install CD in the optical drive. Start up and go immediately into BIOS Setup (usually by holding down the "Del" key while booting up until the Setup screen shows). Go to the place where you set the Boot Priority Sequence and set it so that it tries first to boot from the optical drive, then tries the HDD second. SAVE and EXIT and the machine should boot from the Install CD.
Do NOT do a normal Install - that would wipe out all the old stuff! In the initial menus look for an option like "Repair Install" and choose that. This process does an inventory of all the devices actually in the machine, then compares it to the device drivers installed already on the (old) HDD it has found. Then it attempts to remove the ones not needed and install the ones that are. IF this all works perfectly, your machine will be able to boot up from the HDD.
Sometimes this fails completely. Sometimes it work perfectly. In some cases it works and the machine boots OK, but if you check in the Device Manager you find one or more devices with yellow caution markers, indicating that there is a deficiency in that driver. For those you need to manually find and install the correct driver for that device.