Time sharing operating systems were invented to allow multiple people to use one then very expensive computer at the same time. On a time sharing system many people can run programs at the same time. The operating system is responsible for splitting the time among the different programs that are running. That way you can finish integrating your differential equation while the physics department's nuclear modeling program is still churning away. The physics department nuclear modeling program might take two weeks to run instead of three days, but everyone with the shorter programs is happy (at least until the physicists figured out how to hack the computer so that it only ran their program).
Once systems allowed different users to run programs at the same time it was a short step to letting the same user run multiple programs simultaneously. Each running program (generally caled a process) had its own memory space, its own set of variables, its own stack and heap, and so on. One process could spawn another process, but once that occurred the two processes behaved more or less independently. Mechanisms like remote procedure calls (RPC) were developed to allow processes to interact with each other, but such interaction was expensive and difficult. And this is where matters stopped for about twenty years.
However it's not just users that want to do different things at the same time. Many programs also need to do several things at once. A web browser, for instance, can print a file in the background while it downloads a page in one window and formats the page as it downloads. The ability of an individual program to do more than one thing at the same time is most efficiently implemented through threads.