Ciaran wrote:
"emerge --sync" connects to rsync.gentoo.org and downloads the latest Portage tree, which contains what are known as ebuilds, which tell Gentoo how to compile certain packages, and so on. They also tell the OS where on a Gentoo distfiles mirror they can find the files to download. The distfiles mirror is where all the actual tarballs and such are held. There are quite a lot of them around.
It's a lot more information then that, but yeah. Also, in small rare cases, if there's a patch that needs to be applied to a package, and it's small, they'll throw those in portage as well. Portage also contains any modified default configuration files that work best with the rest of the Gentoo system. It also has init scripts for services as well I believe.