Yes just go to PC world and buy windows XP and put CD in CD ROM and follow instructions, back up important docs first, depending what option you take on installing, it will format you hard drive, in other words, everything on your PC at present will be gone.
But one important question, is your PC powerful enough to run windows XP.
If you bought the PC when Windows 98 was current then I doubt very much if your PC could run Windows XP.
Windows XP is not just a slightly newer version of Windows 98 it is is completely different operating system that requires a more powerful PC than Windows 98 did.
For example, I would not even try to run Windows XP on a PC with less than 256Mb. and in fact I would suggest 512Mb is a more viable suggestion.
Also an old 300Mhz processor (or similar) is going to CRAWL running Windows XP. You need at LEAST a 1,000Mhz processor, more if better.
You sohuld be able to check what your machine is using one of the options on Windows 98.