Go to directory which holds your kernel source (usually /usr/src/linux).
Type: "make menuconfig" which should open ncurses interface where you can set your kernel
After that you need to compile your kernel and modules using "make && make modules_install".
Then you need to copy your new kernel to /boot "cp arch/i386/boot/bzImage /boot/kernel".
Modify your grub.conf / lilo.conf to use the new kernel and that should be it.
Above is for 2.6 series of kernels and it might need some distro specific modifications. But basicly it goes like that.