Each distribution has some specific tools to build a custom kernel from the sources. This article is about compiling a kernel on Debian Sarge systems.
Read about it at howtoforge
It describes how to build a custom kernel using the latest unmodified kernel sources from www.kernel.org (vanilla kernel) so that you are independent from the kernels supplied by your distribution. It also shows how to patch the kernel sources if you need features that are not in there.
I have tested this on Debian Sarge in VMware Server.