In a nutshell
An operating system is the software layer between your programs and the bare hardware. It does three jobs: it shares the CPU, memory, and devices among many programs (resource manager), it hides messy hardware behind clean services like files and processes (abstraction), and it keeps programs from harming each other or the machine by running them in a restricted user mode while the core runs in privileged kernel mode (protection).