First, ask yourself: Do you want to do this? If nothing's broken, you shouldn't try to fix it. I really advise against upgrading to the 2.6 kernel, as it's still being developed. If you're gonna compile a kernel, at least use the stable 2.4 series. If you do decide to take the risk of screwing up your entire system by compiling a new kernel(don't hold me responsible!), proceed.
First, make sure you are doing this as root. Download the full kernel sources (via ftp) from
www.kernel.org. Use "tar -x[z/j]f [directory][filename.tar.[gz/bz2]" (without the quotes) within /usr/src/ to decompress the sources. Remove the symlink named "linux", and make a new one with "ln -s /usr/src/[dirname] linux" in /usr/src to make one pointing to your new kernel directory. Cd to the kernel directory, and clean things up with a "make mrproper" command.
Now, choose your kernel configuration options. You can do this in many ways. Here are the options:
make config
-Select kernel options with a [y/n/q] prompt. You really shouldn't do this. It's a pain.
make oldconfig
-Uses your old kernel's configuration file. Only prompts for new ones. Newer people should use this.
make menuconfig
-Uses a ncurses terminal "GUI" for a menu-selection interface. Pretty good.
make xconfig
-Uses QT libraries for a menu-selection interface.
Once you're done, finish up any modifications to the source, and use "make dep". Go do something else while all dependencies are resolved. Then, use a "make bzImage" command. This'll be a long wait, too. (I clean out my /boot directory [except for the old kernel] and rename the kernel vmlinuz.old, just in case before doing this) Then, use "make" and "make install" commands to install your kernel. When you're done with this, make sure your GRUB/LILO configurations are set correctly. Finally, reboot.