What is a compiler in computer programming?

A compiler, in computer programming, is a program that may or may not be written in the language the compiler is written for that takes a program written in the language that the compiler is designed for and spits out another file. In Java, this file is a collection of "bytecodes", or a program for the JVM(Java Virtual Machine). This is the same in C, but the program is turned into an executable file. Other languages in which the compiler spits out an executable file are FORTRAN, COBOL, C++, and many others.