Microsoft works hard to prevent those types of things. That's called "piracy". Those steps include the necessity for PURCHASING the Windows XP CD to allow for a LEGAL "product key" and "activation". Activation of XP using the product key can ONLY be done on a single computer. If you don't "activate" Windows XP shortly after it's installed,(about 30 days) it won't work anymore...
At this point, based on your description of the error message, I would buy a new computer...You've probably got all sorts of system files that are now damaged or corrupted.
Another option is to purchase a LEGAL XP CD, make sure the computer BIOS is set to boot from the CD-ROM first, then place the XP in the drive and restart the computer. You can then reformat the computer's hard drive (although because of the error message, you should probably replace the drive), then install XP...Of course, whenever upgrading to Windows XP, it's EXTREMELY important to spend time in preparation first. You need to download NEW DRIVERS for all hardware on the computer, BIOS, video, audio, modems, ethernet cards, etc. because the Windows ME drivers usually don't work...In addition, sometimes the devices and programs aren't supported by XP at all...
The other option is to format the drive and reinstall Windows ME with all software and drivers. But as mentioned, if the drive is headed "south", you might consider replacing the drive or purchasing a new computer with XP already installed.
BEFORE doing all of this, you should BACK UP all important documents and files so they can be easily transferred to the computer.
Hope this helps.
Grif