I can write programs for an Arduino, and all I do is plug it in and click "upload". My compiled code gets into the ATMega's program memory. Easy right?
Well, I would like to know what exactly is happening in general. The microcontroller has some memory on it, so there exists some method of taking raw data from a USB cable and writing into the microcontorller as though it were a flash drive or something. However, I happen to know that this isn't possible unless a special bootloader program is already present on the microcontroller.
So now I'm confused. How could I upload programs to an Arduino if it didn't have the bootloader? How do I program other microcontrollers (such as an ARM) without the Arduino's user-friendly interface?
Bonus related question: from reading (and not understanding) a few web pages, I have found out that ARM is programmed through JTAG. What is this doing, exactly? The JTAG module sends data into the ARM, but exactly what data does it send? How can the ARM accept new code without some program already running on the ARM that interprets the JTAG data and writes it into the correct memory?