I second Bobby's answer. On Windows (haven't used anything else really) the chief reason for a gradual slowdown is installing more software.
I tell this from personal experience. I've lived on my Windows machine for some 5 or 6 years without a reinstall and very little degradation of snappiness. I have achieved this by being very picky about what I install. I very rarely install new programs and with great reluctance. I also take care that my startup contains no more than just the minimum set of programs that I want. The less programs are in your memory, the faster your computer.
One particular category of programs that provide a HUGE slowdown are anti-viruses and 3rd party firewalls. I don't use a 3rd party firewall (the Windows built it one works just fine) and I don't use an anti-virus. This might seem a bit extreme, but I know my computer well, down to every last process, so I can just open up task manager and any viruses will be immediately apparent to me (except rootkits, of course). Also, During all these 8 years in which I haven't used an anti-virus, I haven't had any viruses on my computer. Luck? Maybe.
As for the fragmentation and registry bloat - I'm not so convinced. Fragmentation is definately there, and I do defragment my hard drives from time to time, but I haven't noticed any improvements in speed after doing that. Also IMHO most of the registry keys are made by Windows itself, and 3rd party programs account for a very small percentage of that. I've not data to back this up, so I might be completely wrong, but that is the impression I get when navigating the registry in Registry Editor.
That said, there still is the intangible impression that the more software there is on my computer, the slower it gets. It might be because there is less space on my already small system drive (only 40GB, filled almost to the brim) so manging swap file becomes harder. It might be that some software hooks into system and is "running" as a plugin (for example shell extensions) although there are no processes of its own. Could be many things, and probably are too.
But the bottom line - if you don't install more software, your computer doesn't get slower. The exception to this rule might be games which you install on another drive than your system drive.
Added: Forgot to mention - drivers also play a role, although not as much in snappiness as in stability. I have found that the more you tinker with drivers, the more your system starts crashing for no apparent reason. This is especially true with graphics drivers. They have new versions every month, so there is a temptation to keep them up-to-date - but don't. The best way is to install every necessary driver just once, when you install the whole OS, and then leave it. At that point of course take the latest drivers from the manufacturers webpage, but after that don't upgrade them if the manufacturer releases a later version. Of course, there are exceptions to this (like if the updated driver fixes some serious bug that you are suffering from), but most of the time you are better off with the original driver.
And a last note - don't go wild tweaking Windows services and turning off the ones you don't like. That is a piece of bad advice that comes up now and then. This won't give you any noticeable performance increase, but it will make your system more unstable. I once tried that and after that had to reinstall my machine even though I re-enabled everything again. Microsoft knows how to write software that works well on Windows and their services are configured just the way things should be. Trying to be smarter here than Microsoft is plain asking for trouble.