An OS manages multitasking by using a process called scheduling. The scheduler in the OS assigns CPU time to each task, switching between them so quickly that it gives the illusion of simultaneous execution. It prioritizes tasks, manages their execution, and ensures that all processes get their fair share of computing resources.