There's much discussion of this all over the net (Google > "Windows XP activation loop")
This is one possible solution:
1.) log onto the PC using safemode with command prompt.
2.) type in explorer in the command prompt.
3.) in my computer explore windows cd and copy the TOOLS folder to c:\
4.) in the tools folder there is a DEPLOY.cab right click on it and select EXTRACT TO and extract it to the tools folder. (this will create a new folder called deploy).
5.) open the deploy folder and run sysprep.
6.) select factory seal. The pc will shut down once this is completed.
7.) when the PC shuts down start it back up in normal mode. Once it has started up reboot the PC.