Units are created in various places. All the placed units on the map are created at map load time (after the force selection screen if memory serves). Also, when new units are created by a script.
You should use the INIT function to AddAttrib any custom attribs that you want to use on the unit.
The INIT_ function needs to be part of the unit script (e.g. in the main game the $DEFAULT.BSF file includes the INIT.BSF file containing the INIT_ function for all the units).
The function(s) can be anywhere in any of the script files you include for a given unit. E.g. for the main game, almost all the units just use the $DEFAULT.BSF script file, which includes all the move, fire, etc scripts. Any function which begins with INIT_ will be called at the initialisation stage.