Kernels shipped with Linux distributions are, for stability reasons, old. Security fixes from current "stable" kernels are backported into the distro kernels. This means that if the stock kernel with your Linux distribution is working fine with the machine's hardware and workload then you should stick to the distro's kernel (as it will receive automated, hassle-free updates from the distro's repositories).
On the other hand, if you need support for newer hardware, file systems, or specific bug fixes not available in the older kernels, you might need to compile a custom kernel manually.
The "vanilla" kernel sources live here: http://www.kernel.org
Shown here for kernel version "220.127.116.11-zen". Change the
make -j4 to the number of parallel make jobs you want to use (-j2 if you have a dual-core machine):
make -j4 sudo make modules_install sudo make install sudo mkinitramfs -o /boot/initrd.img-18.104.22.168-zen 22.214.171.124-zen sudo update-grub
Some custom "patch sets" for the Linux kernel are available. Different patches target different functionality, like lower latency, better I/O scheduling, support for different workloads, etc: