Definition
Multitasking is the operating-system capability to run multiple processes concurrently on the same physical hardware. Concurrent does not necessarily mean simultaneous — on a single CPU, the OS rapidly switches between processes so that each makes progress while none monopolizes the machine. On multi-core systems true parallelism is also available, but the multitasking abstraction is older than multi-core and works on either.
The two classical models are cooperative multitasking, where each process voluntarily yields control back to the OS, and preemptive multitasking, where the OS forcibly suspends a running process to give another a turn. Linux, Windows NT, and macOS are all preemptive. Cooperative multitasking survives in some embedded systems and in user-space concurrency frameworks (async/await, fibers, coroutines) where the application opts into yielding.
Why it matters
How it works
The scheduler is the OS component responsible for deciding which process runs next. It maintains a queue (or queues, in priority-aware schedulers like Linux's CFS) of runnable processes and assigns each a slice of CPU time. When a slice expires, when a process blocks on IO, or when a higher-priority process becomes runnable, the scheduler saves the current process's CPU state — registers, program counter, stack pointer — and restores another process's state. This context switch is the mechanism that makes multitasking possible. On modern hardware it costs microseconds, which is why interleaving works convincingly.
Multitasking is also what makes processes feel like independent worlds. Each process has its own address space, its own file descriptors, its own signal handlers. The OS multiplexes shared hardware (CPU, memory, IO devices) behind these per-process abstractions so that two programs running concurrently cannot accidentally corrupt each other's memory or steal each other's file handles. This isolation is what lets a Unix shell launch dozens of background jobs without each having to know about the others.