That's not what a kernel does...
"The kernel is written in C, however how did the kernel get compiled without a compiler installed?"
And...
"If the C compiler is installed on my machine before the kernel is compiled, how can the compiler itself get compiled without a compiler installed?"