You're going to want to know C and x86 assembly. Probably wouldn't hurt to study up on Linux, BSD, or some other POSIX-like API that can show you how things like memory management, filesystems, and such are done.
"The Linux Programming Interface" by Michael Kerrisk is a great book that explains everything about how a UNIX system works. For bootloaders, specifically, you can find a few primers on Google on how to code one. You're gonna be writing it in x86 ASM, though.