Will SPI need any program written in flash memory of MCU's so to transfer new program into flash memory ,or it works using hardware of MCU automatically ?
If you are talking about ATMEGA then answer is NO. It does not need any program inside. It is hardware.
I'm sure that this protocol can use other MCUs too, like PIC or similar.