Operating systems (OS) serve as the foundation for computer systems, managing hardware resources and providing a platform for software applications to run.