More then likely it's the video drivers. Lots of screensavers use 3-d libraries that aren't used normally in a desktop and can cause issues with a bug in a driver, thus freezing X up.
This will happen time to time from my propriatory Nvidia drivers.
Usually it doesn't freeze everything up, just X. And since it has control over your keyboard and monitor those things can be rendered useless.
Try hitting ctrl-alt-F1 (or F1-6) to switch to a console and see if you can shutdown X (or just reboot) from there. Try ctrl-alt-backspace or ctrl-alt-del or something like that to break out of X.
Usually what works if you have a second computer or laptop or something is to ping the frozen box. If you get a response then the OS itself isn't frozen, just X. Try telnet/ssh'ing into it and shutting it down (shutdown -h now) or (reboot) from there.
That way you don't risk corrupting any files.
However if the computer is completely frozen, especially if the keyboard lights are flashing, then your screwed and I would begin to suspect a hardware problem.
I'd try just turning off the screensaver, or trying different drivers. Using X11's drivers instead of DRI/propriatory ATI or visa versa.
If it begin freezing up randomly after that, then I would strongly suspect a hardware issue like irq conflicts or memory errors and stuff like that.
What drivers are you using anyways?