A programming language compiler is at one end of a spectrum of translating programs;
at the other end is the programming language interpreter.
Both may exist for a given language.
A compiler produces a machine code file from a written program, but does not execute it.
Typically compiled languages include FORTRAN, C, and Pascal.
An interpreter executes commands in a written program, but does not produce a code file.
Typically intepreted languages include Java, awk, and Python.
The meaning of compile is nicely summed up in this dictionary definition:
• produce (something, esp. a list, report, or book) by assembling information collected from other sources : the local authority must compile a list of taxpayers.
• collect (information) in order to produce something :
the figures were compiled from a survey of 2,000 schoolchildren.
• accumulate (a specified score) : the 49ers have compiled a league-leading 14–2 record.
The machine code generated by a compiler is a different "language", hence "from other sources".
It is collected together in order to produce something (results of running the program).
It is accumulated over several readings of the program to produce a final product.
As for the etymology of compile, it comes from Latin compilare ‘plunder or plagiarize.’
Make of that what you will.