I just installed Linux ( Ubuntu ) in my pc which is not connected to internet. So i obviously cant use software center to install softwares. I downloaded software packages of .tar.gz and .tar.xz format but i don't know how to install them. So can anyone out there can help me please?

For Ubuntu, you want to download packages in .deb format, not in tar.gz or similar formats. You can use apt-get/aptitude to install packages in .deb format that you have on your computer without it being connected to the internet, unless there are missing dependencies, in which case you will need those packages (.deb files) as well.

Most of the time, packages in .gz or other compressed tar images are source code packages that you will have to configure and build with the gcc or other compilers. I don't recommend this for a new Linux user. I do it myself, but then I am a professional software developer with over 30 years experience, most of it in the unix/linux domains.

I have the same problem installing OpenSUSE RPM's. I have downloaded some for testing and they have failed to install...Msg: 'Not RPM repository'. How do I get aroung this vexing issue without resorting to source compilation?

@All, I'm on a Windows 7 / OpenSuse 12.2 dual boot. I'm trying to install audio/Dvd codecs for vlc, Kaffeine, Amorak etc but am getting lots of dependencies which I can't seem to resolve using RPM find. I'd now like to use the source files to get this thorn out'a my flesh. The question is how do I go about this using the command line after having dowloaded the source archives. By the way I used Windows to download the archives then copied them over to my Linux partition. I've noticed a lot of *.dll files when I checked the ToC for Archive. Is this an issue? MayDay!

I have the same problem installing OpenSUSE RPM's. I have downloaded some for testing and they have failed to install...Msg: 'Not RPM repository'. How do I get aroung this vexing issue without resorting to source compilation?

Put all the rpms in one directory. Using YAST, add that directory as a repository (from the CLI is yast repositories). Then from YAST run software install (from the CLI is yast sw_single). Add missing rpms to the same directory and refresh the repository (from the CLI is yast repositories). After some iterations, you will have it working. And if you want to install on more than one computer, just copy the directory over to the new computer and add repository.
Note there are commands in yum (?) that allow some more automation than this process.

Honestly the repositories you said your computer does not have access to, is in the Terabytes.
I began down the Linux road being in your boat. Every time i needed a dependency i had to wait til i went back to work and downloaded it. I barely installed an mp3 player in 4 days using sneaker-net-Tech and no internet connection.
You do have the option to download (elsewhere) all the source DVD's and build your own repository locally. This is quite complicated as being an advanced setup.
The entire idea of *nix systems is to be connected to bigger and bigger systems, only downloading what you need when you need it @ each node.
But to answer the question @ hand is simple.
sudo -l
cd "/path/to/source/binary.tar.gz"
sudo tar -xf ./"binary.tar.gz"
cd "binary"
sudo ./configure
sudo make check
sudo make clean
sudo make
sudo make install