This site saves a lot of time when you need to test code on other boxes and you don't have to wait around to install the OS.
OSBoxes offers you ready-to-use Linux/Unix guest operating systems.
If you don’t want to install secondary OS alongside with your main OS but still want to use/try it, then you can use VirtualBox or VMware on your host operating system to run virtual machine.
Simply download any image you want and run it as VM.
VirtualBox is a x86 and AMD64/Intel64 virtualization product, it is the only professional solution that is freely available as Open Source Software under GNU GPL V2 license.
VMware Player is a virtualization product supplied free of charge for personal use by VMware, Inc. VMware Player can run existing virtual appliances and create its own virtual machines.