I think it's more or less like an app store, to keep it simple. You access the repository and choose what you want to download: it can be either free (as in beer) or require a payment.
I can talk about Mint for example (which, all in all, is Ubuntu): you have some central repositories, where the software is stored (and secured).
The main advantage of central repositories is that you know what you're downloading. It happened that a repository got hacked (here
, but it's the only case I'm aware of and as far as I know it is not a repository from where Ubuntu downloads apps and updates "by default"), but in the end you're more secure when downloading from a trusted, official repository than downloading from somewhere else in the net.