An operating system performs essential tasks like providing an interface between the user and computer, running programs, managing input/output, tracking memory and files, controlling devices, and security. Common operating systems include Windows, macOS, Linux, iOS, and Android. Programs need to be specifically written for each operating system to function properly across different platforms.