I was thinking of installing kali linux on my phone but before that I just had few doubts. Is fastboot a part of firmware and can any one overwrite it to brick my phone?
"Fastboot" is another name for the bootloader. On the devices I've used (Galaxy Nexus, Nexus 5, Nexus 10), the bootloader is stored in a partition called "bootloader", and you can use it to overwrite itself by running
fastboot flash bootloader (filename) from a PC. Overwriting the bootloader partition with something that isn't a working bootloader will presumably brick the device, though I've never tried it.
Google's official factory images for Nexus devices include bootloader images, and flashing a factory image begins by overwriting the bootloader with the version from the factory image. Custom firmwares (such as CyanogenMod) don't include a bootloader, so the device will keep the one from the official firmware.
On a rooted device, it's possible for apps with root access to overwrite partitions (including the bootloader partition) from within the running Android OS. On a non-rooted device, apps can't do that.
I've never installed Kali, but looking at the installation instructions, it apparently installs as a chroot environment, which doesn't involve fastboot or any partition images. So I'm guessing that your concern isn't with the installation of Kali itself, it's that a remote intruder who gets into your Kali installation might be able to overwrite your bootloader. That seems unlikely to happen, but it's possible if your Kali installation is able to run programs as root.