a compiler is a computer program that translates computer code written in one programming language into another programming language. the first language is called the source language, and the code is called source code. the second language is called the target and can usually be understood by computers. in that case, the instructions become machine code.