How does Octoprint manage print jobs?

Does Octoprint upload files to the printer and then just monitor events as the job prints? Or is it feeding it gcode layer by layer? I ask because my Raspberry PI has lost WiFi on at least two occasions and I wanted to power cycle it but wasn't sure if that would kill the print job, too.

It depends if you upload to SD card or Local storage. If you upload to Local and print then it will be sending the commands line by line. If you upload to SD card and print, it just starts the print IIRC and proceeds to monitor it.

Also, according to the popup in OctoPrint, restarting it may cause the print to stop from SD too, definitely not with 'connect on startup' as with lots of printers this causes the board to reset too.