(La)TeX has a macro programming language that expands the macros to their definitions. Only TeX primitives for the direct typesetting, boxing and assignments are not expandable, but must be executed by TeX. In advanced macros the order of expansion must sometimes be changed, content must be fully expanded or certain macros must not be expanded until later.
Often used TeX macros for this are:
\edefand its global form