When you ask this questtion, you should list the specification of your Windows 98 computer as detail as possible.
Before you upgrade to Windows XP, you should check whether your computer meets the system requirement for Windows XP or not. You can check the System Requirement for Windows XP Home Edition at http://www.microsoft.com/windowsxp/home/upgrading/sysreqs.mspx . According to http://support.microsoft.com/default.aspx?scid=kb;%5bLN%5d;837783, Windows XP Service Pack 2 may require more hard disk space than normal Windows XP.
And, you must have whether you have the device driver which support Windows XP for your hardware.
Windows XP have the built-in driver for processor and storage devices (hard disk drive, floppy drive, CD/DVD drive, USB Flash Drive, etc).
But for other hardware such as Motherboard's chipset, video card, sound card, modem, Network Interface Card, web camera, printer, scanner, non-storage based usb devices, and others, you have to install it yourself. Your hardware manufacturer may have already uploaded the latest version of the driver, which support Windows XP, to their website. You should download the latest version which support Windows XP.
You must purchase a new genuine Windows XP Home Edition CD.
If you already have Windows XP CD and used it to install Windows XP on another computer, you must not use the same cd to install Windows XP on your Windows 98. Each Windows XP CD come with one license which can only be used on only one computer. Microsoft does not allow you to install Windows XP on multiple computers with the same CD or same license. If you do it, it will break the license and it is illegal.