If you mean you bought a new hard drive for your current computer and you
want to transfer everything as-is to the new drive - most drives come with
utilities now to help you do just that.
If you mean a new computer (some people call their computer a hard drive -
don't ask me why..), then that would depend on what type of license you
bought XP with.. OEM or Retail.. If retail - no problem.. If OEM, not
legally.