When a program tries to access a block of memory that is not in system memory, that program is stopped, and the block is loaded into system memory. What was in that part of the system memory is written to disk. This is usually called paging.