A kernel error is a failure in some code critical to Windows. If you have ever encountered a Blue Screen of Death (BSoD), then you have seen a kernel error. Windows is actually several layers of programs made to work together. You can think of Windows as if it were your body, with many pieces working together to make a whole, and, like your body, some parts of Windows are more important than others.
The kernel is the most important part of Windows. It includes critical programs to handle things like memory management and device drivers for the graphics card. These programs are like a body's heart and brain. If something in the kernel crashes, it will often cause all of Windows to crash.
Because there are a lot of programs in the kernel, there are many opportunities for bugs to appear. Although Microsoft does extensive testing to get rid of bugs, their testing facilities cannot run through all the combinations that billions of computers use with Windows when some bugs get through.
However, many of the kernel failures are in device drivers written by companies that make hardware, not by Microsoft. Your graphics card, for example, probably uses a driver created by the video company. These companies often work with Microsoft to test their drivers, but having companies work together adds an additional layer of complexity.
A hardware failure can cause a kernel error. If your graphics card fails, it can send bad data to the graphics device driver, which then crashes, creating a kernel error. If your hard disk fails, it can corrupt files used by Windows and cause the programs that use those files to crash.
Registry failures can cause kernel errors. The registry is a database of information that Windows uses to store information about programs. If the registry gets corrupted, the programs that use it can cause kernel errors.
Registry corruption can come from either software or hardware failures. Software corruption can come from a bug in one of the programs that writes information out to the registry. Or if you turn off your computer without doing a complete shutdown, the registry files may not get completely written to the disk. Hardware corruption can happen when the hard disk fails causing parts of the registry files to be lost. It's a good idea to do some research on kernel errors and other registry issues.