The operating system manages threading in computer science by assigning each thread to a separate task running concurrently in the same program space. It ensures fair scheduling, manages the state and resources of each thread, and handles operations like thread creation, termination, and synchronisation.