Code Generation takes an intermediate representation of code (usually a modified Abstract Syntax Tree after Programming Transformation) and converts it in to machine code which can run on the target system.
An example is a C Language program which can be compiled for ARM, X86 and RISC systems.
See also: Code generation (compiler) - Wikipedia