There are several tricks to keep Windows XP running fast. I'll try to list and explain each trick I've used. Try to do these in order.
Scan for Viruses
Use your own anti-virus software of get a free copy of Malwarebytes. This is a great anti-virus software. I highly recommend it. If you are impressed with the free version the pro version is less than $25.
Install Malwarebytes and run the scan and remove any viruses.
Settings
Right click on My Computer and go to Properties>Advanced Tab>Performance>Adjust for Best Performance
You may not like the ordinary display settings after you do this. You can always change it back.
Get CCleaner
Download and Install the free version of CCleaner and open it
Run the Cleaner for Windows and Applications
Goto Registry and Scan for issues. Fix the issues and make a backup when asked.
Goto Tools and Unistall any unwanted or unused software
Stay in Tools and goto Startup. Disable applications that don't need to be running when you restart Windows. If you don't know what the program name is, try looking at the path on the right or Google-ing the name. As an example, you don't need Adobe Acrobat to start. It will start when you click on a pdf file.
While going through the Startup, if you come across a virus that is running, disable it and run Malwarebytes again.
Defragment the C Drive
You can use the installed Disk Defragment software from Windows by going to the C Dive Properties and the Tools Tab and run Disk Degrament from there. I like to use Auslogics Disk Defrag. Click the link for the free copy form MajorGeeks.com. Open Auslogics Disk Degrag and select your drives. Then hit the drop down for Defrag and Optimize.
You should have a noticeable improvement to the speed of your computer after these steps.
Software Links: Malwarebyte CCleaner Auslogics Disk Defrag