I wonder what is compiling, what happens when you compile? I mean yes you press compile or type in in the console but what does it actually do in the \"background\"?
A very brief overfiew would be a compiler parses your code checking for errors and then transforms it into byte or machine code.
For a better overview I would read the wikipedia article on compilers:
http://en.wikipedia.org/wiki/Compiler