Like people, PCs tend to get slower and more cantankerous with age. I have used many different methods for trying to improve the performance of "mature" PCs and here are a few of my comments:
First off, you can't turn a sow's ear into a silk purse. Your old Pentium II machine with 256MB of RAM isn't going to run like it's got a Core i7 2600k. It's just not. Don't expect it to. Don't even TRY to put Windows 7 on it. It would be better off converted to Linux. Modern Windows versions and modern apps were designed for more power and more capacity.
The only really reliable way to restore a PC to top performance is the tried, true and trusty wipe-and-reload, where you first backup your data and then actually reformat your PC's drive(s), then reload the O/S from original distribution, update the O/S to current, update all your various drivers to current (including flashing the ROM BiOS with the latest update), then reinstall the applications you actually use, and then restore your user data. This can get tricky, particularly for such things as saved email where different clients have different locations for storing the data But although this is laborious and time-consuming it will always work to restore your PC's performance.
As for less drastic solutions, the first thing to do is scan for malware. Spyware and adware in particular can slow a machine to a crawl. Viruses, of course, can render a machine actually inoperable.
A couple of good freeware anti-ad/spyware applications are Lavasoft's Ad-Aware (available with reduced but adequate functionality as freeware) and the fully freeware Spybot Search and Destroy. These are both better used periodically as scanning software than as resident malware blockers because both can slow down your system if left resident. And both apps find items the other missed, so I use both, but leave neither resident.
But a problem here is that, in many cases, the chief culprits for the slowdown in performance are the anti-malware applications themselves. Older versions of Norton (before the much improved 2010 version) and McAfee, and most others as well, can be a terrible burden on older PCs. Anything installed by your ISP is sure to slow it down (and may be almost hilariously difficult to uninstall). Some passable freeware anti-malware programs have a much lighter "footprint" and will not slow down your PC as much. Avira and Avast are good, lightweight freeware anti-malware apps, and Panda Cloud provides the least impact on system performance of any antivirus program I have ever tried. For the vast majority of users, these are perfectly adequate to protect their computers from the bad guys.
Personally, on my three main computers I use Norton 2011 Internet Security for resident malware protection, and nothing's gotten by it yet, but the least powerful of these machines is a Core2Duo E6600 with 4GB of RAM so processing burden isn't much of an issue (I won't even describe my new #1 computer for fear that you'll short-circuit your keyboard with all the drool). On my old XP laptop I use Panda Cloud. My even older Athlon 2100+ machine is now a quite well-performing Linux (Debian) box -- no AV needed!
Another thing that slows down a lot of computers, particularly ones running XP, can be All-in-One printer drivers. Full-featured HP drivers can be particularly burdensome (although their most recent versions are MUCH improved!). They mainly slow down PCs during their initial loading at boot, but this can sometimes take as much as ten minutes or more, during which time your PC will respond HORRIBLY slowly, often to the point that it's unusable during that time. On older machines it's usually best to run only the "Basic" drivers rather than the full-featured ones, but even these can be a burden.
A lot of "crap" like temp files can slow down a computer sometimes. Programs like Windows Washer or the highly capable freeware CCleaner can deal with this. Also, wiping (or "bleaching") the free space can, for some reason I cannot fully fathom, sometimes make a PC feel a little "crisper."
Badly fragmented drives can also slow down a computer. The defragmentation program supplied with Windows is rather primitive. Something like Raxco's PerfectDisk may give you hope of an actually noticeable performance improvement, although it takes really extensive fragmentation to significantly slow down overall performance.
I have never experienced any noticeable performance improvement from registry cleaning or compacting. I do it as part of any refurbishment but it's never made any real difference in performance no matter how slopped-up the PC's registry was to begin with.
I once had my own PC sped up really significantly -- REALLY significantly -- merely by reflashing the BiOS. This is MUCH easier and safer to do now than it was a few years ago when it was a, "Now kids, don't try this at home," kind of thing. Some of them now have graphical user interfaces and can be done as easily as installing any application.
Slowdowns can come from all sorts of file corruption-based sources, so it's a good idea to run a system file check from time to time. The command, issued with administrator rights, is sfc /scannow . Depending on how your PC was set up by the vendor, you may need your Windows distribution disk handy.
All that said, I haven't really ever found a good, reliable do-everything program to restore a PC's performance. Indeed, I've never found one that really worked well at all. And believe me, I've looked. In short, so many different things can slow down a computer's performance that it is unreasonable to expect one tool to do it all to restore it to health.