Download Linux kernel source code from kernel.org, then modify, configure, build your kernel. After building you'll get a kernel image usually located at arch/x86/boot/bzImage (if your arch is x86, look at appropriate location for your arch), and this is what you need to test your modified kernel on Qemu. You'll also need a rootfs (use busybox) to run it properly. Use qemu's '-kernel' parameter to pass the bzImage. An example:
`qemu-system-x86_64 -m 1024 -smp 4 -kernel arch/x86/boot/bzImage -initrd initramfs.gz -append "rdinit=/ root=/dev/ram`
it tells qemu to use 1024 of ram, use 4 cpu.