Multitasking allows multiple programs to share common processing resources like a CPU. It works by quickly switching the CPU between tasks. Early systems used multiprogramming which wasn't guaranteed to run programs in a timely way. Later, preemptive multitasking was developed which allows the OS to guarantee each process regular time slices and respond quickly to external events. Preemptive multitasking is now standard in modern operating systems and allows for responsive multitasking experiences for users.