A compiler reads the source code of a program, and produces machine code or bytecode.
Some compilers translate source code into object code. This object code is then passed to a linker, which creates machine code. Other compilers translate into intermediate languages, like C.