The operating system controls the computer by providing an interface between the user and hardware to make the computer more convenient to use. It manages processes, memory, files, security, and interprets commands. The operating system allows users to start and stop processes, allocate memory, create and manage files and directories, implement security measures like passwords and firewalls, and interacts with users through either a command line or graphical user interface.