Here is is a really good video on the topic :).
https://www.youtube.com/watch?v=Sww1mek5rHU
(in-case the link doesn't work) Arduino Uno to ATmega328 - Shrinking your Arduino Projects by DroneBotWorkshop
Also it has a lot of extra info so here is a link to the approximate time stamp to what you were asking about the boot loader. (honestly the whole video is good for learning the UNOs architecture).
https://www.youtube.com/watch?v=Sww1mek5rHU&t=914s
(15mins, 14seconds into the video)
It does not cover how to load the boot loader onto a bare chip, you can also by a bare chip with the boot loader pre installed, and that's what many people do, but here is how to flash a boot loader from the Arduino website. (you will need supplies to do this)
https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard