Ken Shirrif has written a great blog post with the goal of making the the internal operation of the Beaglebone less mysterious:
BeagleBone I/O pins: inside the software stack that makes them work
The BeagleBone’s GPIO pins can be easily controlled through the file system, but a lot goes on behind the scenes, making it very mysterious what is actually happening. Examining the documentation and the device drivers reveals how these file system writes affect the pins by writing to various control registers. Hopefully after reading this article, the internal operation of the Beaglebone will be less mysterious.