I am wondering how the OS is reading/writing to the hard drive.
I would like as an exercise to implement a simple filesystem with no directories that can read and write file
Just a complement to what Coyote21 said. You can read this thesis http://www.minix3.org/theses/gerofi-minix-vfs.pdf
In this thesis you can learn a little more about VFS and some details are described there. There are very helpful things in appendix B. There is an implementation of a file system (not a real file system, but one in memory).