This is only possible because Whonix consist of two machine (Virtual).
One machine totally runs with TOR and acts as gateways, which is called Whonix-Gateway.
Another machine which is completely isolated Network, known as Whonix-Workstation that only allows Internet connections to be routed through the Whonix-Gateway. All the connection is made through TOR.
Whonix is designed and produced by the TOR group anonymity software.
This is Just a breif deatils on Whonix. If you need more details about is then vist its Documentation or Technical design page. There you can more abouts its design, security level, and its features. If you have any question related to the Security of Whonix see its Security pages.
Download Whonix from Here
After Download default username and password are