If you've lifted the XP HDD from a previous PC, then it's not going to work with the new h/w.
When Windows installs, it customizes itself to the mobo and graphics chipsets of the old PC and maps the environment it finds. None of that will exist on the new PC, so the XP will most likely hang or BSOD as you try booting it.
If it's a retail copy, and you have the original Installation CD, you can "repair install" it in the new PC so that it recustomizes to the new hardware.
If it came pre-installed on an earlier PC, it will have an OEM serial number and you will not be able to use it on any other h/w than that with which it came packaged.
OEM copies of Windows are price-discounted because they are non-transferable. If the hardware dies, the OS has to be buried with it.