It's not as difficult as most people think it is.
You start with a good look at the URL indicated in the other post (if you want my advice, print it out and spend a lot of time studying it);
then you go to
http://www.kernel.org
and download the latest kernel - or whatever kernel you think you need. I've been using 2.4.18 for some time and it works quite fine.
Traditionally, the sources are kept in /usr/src, so save it there. Be aware that it will untar in a subdirectory called linux. You might already have one there , or a symlink, so make sure you move it before uncompressing.
The usual practice seems to be to move the uncompressed directory to something like linux-2.4.xx and then symlink it to "linux" - this way you can have as many source trees as you want and always point the symlink to the latest - or the one you currently use.
You'll need to collect some information about your system before actually recompiling the kernel. Basically, the output of lspci and lsmod should be enough, plus the knowledge of what filesystems you use, and stuff like that.
At that point just cd to linux and execute make menuconfig (do this as root, makes your life easier).
What else? Ah, yes, make it as modular as you can - but remember that a few things must be compiled-in: support for whatever filesystem you have in / and for whatever controller you use for your boot disk; and for ELF executables, at the very least.