An operating system is a program that manages a computer's hardware and software resources and provides common services for computer programs. The main functions of an operating system include managing hardware and software resources, providing a consistent interface for applications, and serving users by allowing interaction and keeping up with changing needs. Common types of operating systems include single-user systems, multi-user systems, single-tasking systems, and multi-tasking systems.