Malware can only be found on your hard drive.
The issue is either your data that you reinstalled (if any) contains an infection, or the infection survived the formatting. Sometimes a simple formatting is not enough.
You can run Killdisk to delete everything including any infections. This is a free progam and can be downloaded HERE
. Put the program on a floppy disk or a CD.
Then run a DOS disk, such as a Windows 98 start up disk, when the computer boots to DOS, type "C:" (without the quotes), push ENTER. Then type "fdisk" (without the quotes), push ENTER, then just push ENTER at each selection that you are prompted to make (in other words, just accept all defaults). You can download what you need HERE
Then reboot with your XP CD in the cd drive and reinstall Windows, being sure to choose "Full Format" instead of quick format when prompted.
Be careful about reinstalling your data as it may contain a virus or other malware.