If you keep your XP machine behind a router rather than directly connecting to the Internet, it affords you some protection from hackers.
Set your router DNS to use OpenDNS with malicious site filtering turned on.
Get a modern, actively updated browser and use that instead of Internet Explorer (never use IE again, actually) and install AdBlock Plus as a browser plugin to help filter out malicious sites and flash ads.
Get a modern, actively updated anti-virus + anti-malware product and use it.
Don't download stupid shit from sketchy websites. Don't install stupid shit from sketchy websites. Don't install "cracked" versions of anything, including XP itself. That's how we get ants infected and/or compromised.