Phone [Q] Help me with Basic Android development tools

Ok, at the outset I would like to make it clear I am the beginner of all beginners when it comes Android tweaking and the doubts are related to it.

I have Samsung Ace GT S5830i phone. Its rooted and CWM installed. Kindly help me clear the following doubts regarding custom roms, kernel and firmware.

1. What is a kernel and What is a stock firmware. Are there any differences between it.

2. If I am installing a custom ROM, which has a custom kernel. Which do I install first? ROM or KERnel? Or whether both are bundled together as a single installation.

3. What is Odin and for what is it used for

4. If I have a CWM backup of my phone, and while installing a custom rom with custom kernel, If my phone gets bricked. Can I unbrick it by restoring cwm backup I have taken, or should I have to go via Odin (also how do i do it via Odin)

5. Can I install a different kernel on the existing rom, will it wipe of all my applications and settings?