The purpose of multithreading in computer science is to allow multiple threads within a process to execute concurrently, improving the efficiency and performance of an application, particularly in multicore systems. It helps in parallelising CPU tasks, managing asynchronous I/O and enhancing UI responsiveness.