I'll attempt to answer, though someone else may be able to provide more detail.
kernel_task is the first process that is run by the kernel (core of the OS) during system startup. It is responsible for system initialization and starting up further process in the system init process. I'm not sure if it does anything after system startup - it may well be what controls basic operations such as disk / file access, etc, which make the computer do its thing. I'm not really sure if that stuff is in kernel_task or if it's buried deeper within the kernel itself. But rest assured that this process is vital to your machine being able to do anything at all!
WindowServer draws everything you see on the screen. It acts as a mediator between applications that want to draw on the screen and the graphics hardware. When an application wants to draw something, it establishes a connection with WindowServer, tells WindowServer what to draw, and WindowServer handles the drawing / compositing / Quartz Extreme hardware acceleration to finally produce what's seen on the entire screen.
That's basically at a high level, and about the extent of how much I know about this stuff. Like MoparShaha said, don't touch either one, or you'll be in big trouble...
If anyone wants to add anything or correct anything I've said, feel free.