How to update embedded software
In comparison to the PC-like systems, microcontrollers do not have an operating system, file system, and no network stack. Most probably it is connected to the host device over some sort of serial port.
The Microcontroller has some "program memory" and after powering it on, the CPU starts executing instructions from the begin of it.
How is the firmware is written into the memory?
Programm can be stored using a "programmer" device.
Such a device connects directly to memory and writes data there. This works well if you have physical access and you have not too many of them. You can not avoid it if the microcontroller is the only smart part of the system.
But if you manage a distributed fleet of smart systems (like charging stations or vending machines) updating using programming will be quite expensive.
Split the application into two parts, and store them in two separate memory locations. One part called "bootloader" will be the default starting point of the application, and it will only have the functionality of communicating with the host and writing data to memory.
The main application can be written by bootloader from the host system. And bootloader can transfer execution to that app.
This way even the firmware for the microcontroller can be frequently updated and new features can be added to remote systems.