What operating system? if its XP then the problem is likely occurring most often when you have a browser running (IE, Chrome, Firefox, etc.). Does it happen when you look at a video? Software grows with technology. Flash and Shockwave have become very taxing of resources.
I have had good luck with CCleaner which was mentioned in a previous reply. It may and may not help much. But run it anyway. I was first introduced to CCleaner through my hosting service for my website.
You can see what is consuming your resources in taskmanager. You knoww... rt click on the taskbar, select taskmanager, click processes tab, sort on cpu. You will likely see something relatede to the browser you are using. You can end that particular process and the usage will drop. It won't fix the problem, but you will know where to start looking. it'll start back the next time.
I have fought this issue. My PC is 2004 1.5g ram Amd Turion 64 mobile. So I am quite familiar with the whole dilemma. I did a complete redo of everything and have decided that modern computer technology has just up and run away and my pc just can't keep up. I have decided to budget for a new one.