Actually you need to flash different kernels for different roms... Like Stock-based(Sony) Roms can be either run on Stock Kernel(Sony) or Stock-Based Custom Kernel(like DooMKerneL). while AOSP Roms(like CM11) should be run on AOSP-based Custom Kernels(like Pimped Kernel).
You can flash custom Kernels only if you have unlocked your bootloader. if you have recovery on locked bootloader, then you can flash only Stock-based roms because they dont need a different kernel becoz they run on Sony Kernel itself. If you have a unlocked bootloader you can flash custom kernel, Then you can use both Stock-based Roms or AOSP-based Roms by flashing respective kernels.
If you already have Custom rom installed and changing to another Custom rom, Then if you are changing from (Stock-Based Rom to another Stock-Based Rom) or (AOSP-based Rom to another AOSP-based Rom) then you need not flash the kernel again, you can just wipe all partitions and install the new Custom rom over it. But if you are Cross flashing from (Stock-Based Rom to AOSP-Based Rom) or (AOSP-based Rom to Stock-based Rom), Then you should flash respective kernel, wipe partitions and install the rom over it.
if you dont know, whether the rom is Stock-based or AOSP-based, it will be mentioned in the OP of each Thread.Usually Roms that are available for a wide range of devices across OEMs are AOSP. Roms like CM, AOKP, PAC, Carbon, etc. are all AOSP roms.
Hope it helped.