The operating system of any computer is essentially a program which setups and controls the hardware devices, and controls the software applications. When the power button is pushed and the computer is turned on, the OS is loaded into the RAM. The booting sector is already in the ROM. The booting sector loads the OS into the RAM.
There are two main types of operating systems: those made by Microsoft, and those which are open source. Click the links to read my papers on both types of operating systems.