Compiler
What's a compiler? A miserable little pile of secrets! No, actually Dracula, it's a program that takes source code, goes 'NOM NOM NOM', and poops out an executable. Duh.
The Details
To be completely accurate, the compiler by itself doesn't actually output the .exe file. That's done by a separate program called a linker. The compiler processes each .cpp file in your project, turning your C++ statements into machine code that the CPU can understand, and outputs an .obj (object) file that contains machine language instructions for each one processed. The linker then jams all the objects together and links up the function calls, outputting that sweet, sweet binary executable.
Now compilation of a .cpp file generally proceeds in two phases. The first phase is called 'preprocessing', and we generally say that this is carried out by the 'preprocessor', although in actuality there is no separate program for the preprocessor, it's just a routine run by the compiler. After preprocessing, the compilation proper begins and an .obj file is pooped out. Other files with metadata for debugging purposes etc. may also be pooped out.