When installing/activating a system extension, what determines when it's run?

A successful installation/activation can either be "yay it's done now!" or "wellllllll you need to reboot first but otherwise it's done yay!"

So what determines which of those two happens?

When installing/activating a system extension, what determines when it's run?
 
 
Q