Sandboxing software runs programs in a self contained and protected environment, known as a sandbox, which is isolated from the rest of your system.
Any changes a sandboxed program makes are intercepted by the sandbox software and contained within the sandbox, so viruses and other malware can't make any changes to your system. Essentially nothing can escape the sandbox unless you specifically allow it and in a way it's like running a self contained virtual session on your PC.
If you encounter a virus or other malware in a sandboxed browser session you can just close the sandbox and it's all gone.
We always try to protect our members from dubious sites/content and as an example as to how useful sandboxing software can be, I use it to safely check out suspicious looking URLs or potentially infected downloads.
You can get free sandboxing software and I'd recommend Sandboxie if you'd like to try any of this out.
I run this in Windows 7 but according to the producers of the program it's now fully compatible with Windows 8. You might want to read this first though.