The web server performs the compression on the fly. That web server could be Apache, IIS, nginx, etc. The specific process to enable compression is different for each server. In Apache, it's done with the mod_deflate module.
You're almost certainly looking for info about the general process of minification -- stripping out whitespace and comments, and sometimes munging the code in other, more complicated ways -- in order to reduce it's size.
For a long time, the [YUI compressor was the de facto standard for minification. Today, [url=https://developers.google.com/closure/compiler/]Google's Closure Compiler](http://developer.yahoo.com/yui/compressor/) has largely superseded it.