What is happening is that the repositories in your /etc/apt/sources.list file point to a database full of binary files. Each binary file requires other binary files called dependencies. Apt-get compares the database at the repository with a similar database on your machine. If you already have the dependencies installed, it will only fetch the file you're looking for (such as evince). If you're missing some dependencies, it will download and install them first, and then install the file you're looking for.
Since linux is a toolkit based operating system, many programs use the same toolkits over and over. So apt-get is really doing the legwork to make sure that you have all the files you need for a program to run. In Windows, many programs may use the same toolkit, but the toolkit is compiled in so that the files are bigger and you may have installed the same toolkit several times (once in program1.exe and once in program2.exe).
When you compile from source, you generally have to make sure you have all the libraries and dependency files yourself (although I think Gentoo has a system that handles dependencies before you compile, I'm not really sure). If you're missing one, the compile will fail or the operation of the program will fail. This is called dependency hell and used to be prominent on Red Hat, although I think most modern distro's have some program like apt-get to do the legwork.
|