It would help if you were to post the make and model of this computer, or if it is a custom build which you have the installation disc for.
Unfortunately, if you go ahead and install the drive in another system, but there are identifiers in the chipset which can effectively confuse Windows enough that it will fail to start. Even if it does start there is a very good chance that the operating system will start having problem which could escalate to the point that it fails and will require a fresh installation of Windows.
If you do a fresh install of Windows the HDD/SSD will be formatted, this will remove all of the content of the drive.
You can connect the HDD/SSD to another computer to harvest whatever data you don't already have backed up on removable media. You should do this first.