XP's firewall is rather basic as it only stops incoming and doesn't stop outgoing.
So if you have a worm that sends mass emailing from your PC it won't block this.
But it's free and provides some protection.
Third party firewalls like Norton or ZoneAlarm will certainly do a better job but you'll have to learn how to set them properly especially if your PC is part of a network.
BTW, if you change your OS make sure you back up all your files and it is highly recommended to do a clean install of XP.
Before you start go to this site to do an online scan to see if your PC is compatible with XP.
If any software or hardware are noted to be incompatible make sure you remove them before you install XP.
XP Readiness Test
Clean Install XP
Windows XP Installation
I am planning on upgrading my system soon to Windows XP Home edition. A friend of mine told me that XP has it's own built in firewall program. Which is better the firewall that's a part of XP or a 3rd party firewall like Norton Firewall?

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic