Before you do anything at all. Go into Device Manager and write down the name model and manufacturer of all the hardware in the PC.
You'll need to go and find XP drivers for all the hardware so it will work once XP is installed.
Once you have all drivers, and have made sure the current specs of the PC can handle XP. Then you can decide whether you want to preserve the currently installed Apps or not. And whether you want to backup anything.
There's no point in going through all the process only to find out the PC can't handle XP.
Once you know it can handle it, and you have all the drivers for the hardware, on a separate media, you can proceed to format, using the XP setup disc.
Formatting will erase everything on the machine. So if you don't have install discs for all the apps you want back, then you need to either get them, or consider an in place upgrade of win98 to XP. That way the apps are preserved, as are all the documents. Since no formatting occurs.
I would not recommend an in place upgrade, as it usually causes more problems than it solves, unless you don't have install discs for apps you really want to keep.
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.