Depends, as per usual.
If you bought Windows XP Retail, the license can be transfered.
If you bought Windows XP OEM (either with the computer or pre-installed),
then it is tied to the computer that you got it with (check out the EULA for
more indepth options). Basically, it has been relayed to me as:
OEM product has been provided to the OEM at reduced cost to relay onto their
customers and to invest in improving their own support personel (skilling
and training). As it is sold at a reduced cost to the OEM, the software is
then bound to that computer and that computer only. If you change major
components of the computer (i.e. MB or CPU or some other things) then it
isn't the same PC anymore. Therefore it would need new software.