Your question is too vague for anyone to give you a thoughtful answer, but here's the gist.
Compiling a kernel requires sources, so you'll need to get those. Most Linux distros have a package for downloading the latest sources, or you can go manual and just download the latest tarball from kernel.org
Then, once you have the sources, un-tar them somewhere (usually
cd into it and use
menuconfig to compile it for your environment. When that's finished, you'll run
make && make modules_install and after a whole lot of output, you'll find a compiled kernel in
arch/x86/boot/bzImage -- assuming you're using an x86 architecture and you setup the kernel to use bz2 compression in
For a more long-winded and useful howto, you should check out the Gentoo handbook.