^^^ its done using a cluster, usually in a master node and lots of slave nodes
most of the time linux is used, but you will also find unix also sometimes
uses a special kernel which allows processes to migrate from one machine to the other with a load balancing arrangement, that way you can avoid having to specifically write apps to work in parallel---see openmosix or beowulf clusters on google
a cluster that size is a special deal though, it will be 100% custom down to every piece of software on it, and they will spend more than a year refining it and tuning it
you can build your own cluster at home, it isnt hard, there's even a knoppix version setup using openmosix just for this reason, Ive built an 8 node cluster before.........the hard part is dealing with the networking end of it, latency and bandwidth is tough to deal with unless youve got lots and lots of $$ to spend