This generally happens when your computer is running really low on RAM. When you run out of memory (RAM), the computer resorts to use the page file, which uses the hard drive for storing memory, and that runs much slower.
It probably happens when you're running many programs at once?
Rebooting will clear your memory and everything should run at normal speed, but if it persists you should just buy more RAM. It's not too expensive and it's easy to install. I've seen 512MB sticks at stores like Best Buy for only 60-70 dollars.