To download the programs only without installing them, you can use the
-d option in
apt-get like, for example,
sudo apt-get -d install firefox. This will only download the packages and not install it.
The downloaded packages will be saved in
/var/cache/apt/archives. You can copy them from there to some other location, and then if you ever need to install the programs, then you can copy them back.
If you have an offline computer separately that you want to install packages to, then you could try
apt-offline. On the offline computer it generates a list of files that need to be downloaded to install a program, and you can then download those files (either manually or using
apt-offline again) from a different computer and copy them back to install.
There is also a GUI for it called
apt-offline-gui, which makes the process much more user-friendly.