First extract the compressed file, open the Terminal Window
$ gzip -d package.tar.gz
Now, you'll get a TAR archive file in the same directory.
$ tar xvf package.tar
To install a software package:
$ su -
# ./install.sh
Or you may get a file by name package-install.sh
Also read the file README for full instructions.
To install the package from the Source code:
First you should have installed the C/C++ compilers (gcc, g++, etc.,)
$ ./configure
$ make
$ su -
# make install
You can follow the steps given by @Mediator, I'm just making things more clearer
& simple for you to understand.