In the traditional Van Noyman computer architecture, there is some subset of information which defines exactly what state a processor is in. This state, in combination with other inputs from memory or I/O devices, defines exactly the sequence of future states. For the most part, the state of memory and I/O devices is assumed to be static (unchanging) unless the processor explicitly changes them (if they are changed by some other entity as an I/O device, the processor is usually notified by an interrupt for efficiency – more on this later). On the other hand, the processor state changes continually and ``consciously'' with every operation.
We call this special state the context of a processor. By saving and restoring (changing) the context of the processor, we can allow one processor to do the work of many, making it possible to manage the computer's processors more efficiently. We can also construct the useful programming abstraction of independent threads of execution. A processor can execute one thread for a while, then go off to execute other threads. Later, it or another processor can continue executing the first thread where it left off.
Regardless of the number of processors, fundamental to this activity is the processor's ability to save and restore (exchanging) thread contexts. We need to provide a provide a programming abstraction to encapsulate this process. Within the power of common high-level functional languages, there two approaches we could build: