How does a operating system work. How is it made

I have recently posted a question on the verge and I got it the answers I wanted so I am going to ask another one which I care a lot more about. How is an operating system made, how is the code intertwinded to work? What language is it in, If more than one what are they all and which one do you prefer. If there is more than one language, is it possible to make a operating system with only be language? How does an operating system work, I am very interested.