When a process references memory, the CPU's MMU uses page tables to translate the virtual address to a physical RAM frame. If the present bit is 0, the CPU triggers a page fault interrupt. The OS pauses the thread, fetches the 4KB block from swap disk into RAM, updates the page table, and resumes the instruction. That is why excessive swapping grinds your computer to a halt.