Arduino 2560 bootloader

I have been working on Atmega8/48/128/2560 but I am new to Arduino and bootloader. I did not have to work with bootloaders in the past so I am very confused about this topic. I am trying to make a board similar to Arduino Mega so I am stuck here... I have questions about bootloader. The bootloader loads program into flash everytime it restarts. Does that mean that firmware program is stored in some other parts of memory and bootloader loads Flash from that memory every time the system restarts?

How can I burn the bootloader program into Atmega2560 ? Is it okay if I download stk500boot_v2_mega2560.hex file from bootloader folder of Arduino by first burning the boot lock fuse bits, then the above .hex file from AVR Studio 4 which I'm using currently ?

That should work… if the fuse and lock bits are set, and the hex file flashed, you should be good.

The bootloader gets stored at the end of the flash. That’s why the maximum sketch size is not 256k. the BOOTSZ1…0 fusebits set the size of the bootloader (really, setting how far from the end it expects the start of the bootloader to be), and when BOOTRST fuse bit is set, it jumps to that location on reset, instead of straight to the program.