Creating a Tarball with compression:

tar -czvf tarball.tar.gz folder/

Extracting a Tarball:

tar -zxvf tarball.tar.gz

Viewing the contents of a tarball

tar -tvf tarball.tar.gz

Extracting a single file from tarball

tar -zxvf  tarball.tar.gz folder/filename

or

tar --extract --file=tarball.tar.gz folder