Whether I'm setting up a new VPS somewhere or installing an Ubuntu ISO on an old computer I have sitting around, when I want to get my favorite programming enviornment setup all I need to do is type
sudo apt-get install foo baz bar
and then my computer -- does something -- and at the end I usually have the software I'm after.
How does this work? Is apt-get downloading precompiled binaries? Or is it downloading source and building things for me? Or some sort of other packaged thing its installing? Or all three? Regardless of which, who's building these binaries, managing these build recipes, or putting together these packages? Whatever apt-get is doing -- where are the bits its sending me served from?
I'm vaguely aware that my composer/VPS will have a list of apt-get repositories it checks for packages. Are these just feeds hosted on an HTTP server somewhere that point at things? Or something else? Who hosts these feeds?
When I'm using a package manager like composer (for PHP), I know that there's a master list of packages at packagist.org composer repository, that a user can specify other packages repositories, and that repositories only point to version control systems where a package's source files are stored. I'd like to have a similar high level understanding of how apt-get works.
I realize this is an impossibly broad question -- pointers towards where in the FM I could read about how everything gets tied together would be a perfectly acceptable answer to me. (although if you're passionate about linux package management please don't let that stop you from answering)