The microcontroller does not understand higher programming languages as such, so that it is necessary to compile the program into machine language. A single click on the appropriate icon within the compiler results in creating a new document with .hex. It is actually the same program, only compiled into machine language which the microcontroller perfectly understands. Such a program is usually called ahex code and forms a seemingly meaningless sequence of hexadecimal numbers. When compiled, the program should be loaded into the chip. And you need appropriate hardware to make this happen. In other words, you need a programmer.
As mentioned, to enable a hex code to be loaded into the microcontroller it is necessary to provide a special device, called the programmer, with appropriate software. A large number of programs and electronic circuits used for this purpose can be found on the Internet. The procedure is basically the same for all of them and looks as follows: