On the stack or on the heap. All is in memory. Any part of memory can be swapped to the paging file at any time.
When memory is low the paging file maps memory. Memory is as big as the OS model (2Gb for 32 bit per process and 2*63 for 64 bit). Of course the paging file and available disk space can limit this.
In the latest version of Windows there are two file: the pagefile and the swapfile.
Lack of physical memory only slows things down. The virtual memory is always there if resources allow.
\_(ツ)_/