Yes. If you insert your Windows XP CD while Windows 98 is running, it will ask you if you'd like to upgrade. It will then copy some basic files to the hard drive and restart.
Windows XP uses less RAM (Random Access Memory) making it "faster". However, if your computer has a good amount of RAM Windows 7 will work just as well if not better.