The compilation in Magento is different than classic code compilation like in C or Java. The compilation process doesn't reduce the file size, neither does it transform the PHP code into a machine code, it just creates hard copy of all classes from all magento modules (core and custom) into a single folder so that the autoloader can load them faster (instead of traversing a big number of folders and subfolders to reach to it). The copies are stored inside the
If you have activated the compiler, magento will search for the classes only in the
includes folder. And if you install a new module whyle the compiler is activated, it won't automatically create a copy of the new classes inside the
include folder, so it won't find the module classes. That's why you need to recompile everytime you change or add any class in any magento module.
You can find more details about the compiler on Alan Storm's blog http://alanstorm.com/magento_compiler_path
For caching, you can read this related question and answers https://stackoverflow.com/questions/9283279/explain-magento-caching-system