Macros in Zabbix are key to building scalable architecture within Zabbix. Macros can be used almost anywhere within Zabbix and allow you fill an unlimited number of variable fields that retrieve the value from a single set macro. There are different levels of macros that override each other, which makes the system much more versatile.
A global macro is found by navigating to Administration > General and select Macros on the top right drop down box. These are the top level macros that can be applied to anything within Zabbix. Global macros are typically used to set poll intervals, duration of storage, averaging times, and other factors used throughout Zabbix.
A template macro is found within a template under the Macro tab. These macros are only applied to items, triggers, or hosts that are related to the template. Template macro values will override global macros if the same macro name is used. Template macros are typically used to set information regarding a group of devices such as login information, community names, thermal thresholds, software level thresholds, device specific interval settings, etc.
A host macro is found within a host under the Macro tab. These macros are only applied to the selected host. Host macro values will override template and global macros if the same macro name is used. Host macros are typically used for special condition devices that do not follow the standard schema of a group. If a device has a specific login credential or thermal setting, than it would be set at the host macro level.