An operating system is a program that manages hardware and software resources on a computer. It controls memory allocation, processes input/output, manages files and storage, and controls peripheral devices like printers. Operating systems can be found on many devices like phones, game consoles, desktop computers, and run programs by scheduling processes or threads. Their main function is to allow other programs to run by allocating resources and coordinating hardware and software interactions.