Write Your Own OS is a short tutorial on how to write a “toy” operating system from scratch. Pretty cool way to get an understanding of how an OS does what it does. The article is designed for Windows environments.
If you are running a Unix variant then checkout Writing Your Own Toy OS (Part I), (Part II), (Part III) from Linux Gazette. Great stuff!