Batch operating systems were the first OS's, and were common up the 1980s or so; some are still running today.
The essence of a batch OS is its lack of interaction with users; a job - a program, along with all its input data - is handed in to the system; when there is an opportunity, it is run; and any reultant output is provided back to the person who sumitted the job.
The earliest batch OS were not multitasking; all jobs ran to completion, before the next job started. However, this does not make efficient use of a system; while a job is waiting for I/O to complete, the rest of the system is idle. This was especially a problem for the very expensive computers which were the norm at that stage.
So multitasking was added, because having a mix of jobs running at any time is the best way to maximize the use of the system. However, this brought in other issues: e.g. in the earliest stages of this, all jobs which were running at any time had to be resident in main memory together.