The idea of a compiler, is to convert human readble code (C, PHP, Java etc), into machine readable code. When you execute your PHP scripts, they are interpreted (almost inline compilation), which means they are read a line by line, and the code is executed accordingly.
Compiled code, means that it is compiled at source, therefore is already in machine language (or byte code for VM languages like Java), and therefore, the server does not have to interpret the code each time. This makes it quicker.
Facebook created a PHP compiler to speed up their site. The idea of compiled code is that usually, once it is written, it doesn't change for a while, so there is an overhead in having to interpret it into machine language each time the code is executed. That is why your friend means by optimize.
It will therefore be converted into machine language or bytecode (not exe, but effecively the same concept).