A microcontroller programmer or microcontroller burner is a hardware device accompanied by software that is used to transfer the machine language code to the microcontroller/EEPROM of the PC. The compiler converts the code written in languages like assembly, C, java etc. into machine language code (which is understandable by machines/microcontrollers) and stores it in a hexadecimal file. The microcontroller programmer acts as an interface between the PC and the target controller. The programmer API/software reads the data from the hex file stored on the PC and feeds it into the controller memory. The target controller on which the program needs to be written is placed on the programmer using a ZIP socket. The software transfers data from PC to hardware using serial, parallel or USB port.

Figure 1: Block diagram of a microcontroller programmer
Depending on the way you interact with the PC, there are three types of microcontroller programmers :
Parallel Programmer uses the PC's parallel port. They are low-cost programmers but are not widely used.
Serial programmers use the serial port to interact with the PC via RS232 protocols. They are most popular among hobbyists working on PC. However, both serial and parallel programmers will become obsolete in the near future. The main reason is the unavailability of parallel and serial ports on PCs and laptops in the coming years.
USB Programmer uses USB interface to transfer data from PC. The main advantage of USB recorders is that they are powered by the PC itself and there is no need for additional power. USB programmers have already become popular and will soon replace serial and parallel programmers.
The programmer usually contains a microcontroller that is pre-programmed to obtain data from the PC and program the target controller. The programmer writes the target controller using any of the protocols such as SPI, parallel interface, I2C/TWI or CAN. The write speed depends on the way the programmer interfaces with the PC and the protocols used to write the target controller.
The conventional method for recording a controller is to take it out of the loop, place it in the recorder, and then dump the hex file into the controller using the API. To eliminate the problem of removing the controller from the circuit every time it needs to be programmed, the controllers have now been updated with the In System Programmer (ISP) feature. This allows you to write/program a controller without removing the controller from the circuit in which it is used. The latest controllers come with features like bootloader memory that enables auto-save features, i.e. such microcontroller controller does not need any additional programmer hardware. They just need an API to transfer the program to the target controller. This API can also be built into the compiler and therefore the compiler can directly write the target controllers.