A compiler or program translator is a program that transforms code written in one language into another language. The input code is called the source code, whereas the translated code is machine code.
A compiler translates high-level programming languages (e.g. Java, C++) into a low-level language (such as Assembly) to create an executable program.