The first thing to do is go to Microsoft's Web site and check whether your computer hardware is compatible with XP. If your running Win98se, there may be some problems.
Assuming all is well, the only likely successfully way to load XP is from a clean install. In other words, you re-format your drive and start from scratch.
In this case, you will loose everything on th drive, so you need to back-up all essential data and all your applications (programs) will have to be re-installed, assuming they too, are compatible with XP.
All in all, it's a potential minefield click here for one of your contemporaries experiences of trying to upgrade.