An operating system (OS) is a program that manages the computer hardware and software resources and allows users to interact with the computer. It performs tasks like managing the processor, memory, storage, and interfaces. There are different types of operating systems including real-time operating systems used to control machinery, single-user single-task systems that allow one user to do one thing at a time, and single-user multi-tasking systems like Windows and MacOS that most people use on desktops and laptops.