Read this book for in depth info:
Operating System Concepts
http://www.amazon.com/exec/obidos/tg/detail/-/0471694665/qid=1120709225/sr=8-1/ref=pd_bbs_ur_1/002-8170624-0703247?v=glance&s=books&n=507846
Brief Explanation:
http://computer.howstuffworks.com/operating-system.htm
Regards,
Vikram