You run two VMs in VirtualBox. One is a Tor gateway, the other is a workstation. Both run Whonix and are preconfigured for this. A virtual network between them is set up so that the workstation can only access the Internet via the Tor gateway VM, so it's impossible for connections to "leak" directly to the Internet without going over Tor. The gateway VM runs in the background and you run a regular browser in the workstation VM.
https://www.whonix.org/wiki/Whonix-Gateway
https://www.whonix.org/wiki/Whonix-Workstation