tar The .tar filename was originally designed to be used as a TApe ARchiver to store entire file systems and files as single files on tape storage medium. It was designed by AT&T in 1979. Today, the format more commonly refers to an archive or collation of multiple files into a single file with the .tar filename extension. The format is an open source file archive format commonly associated with the UNIX tar command however other data compression tools are capable of effectively compressing and/or decompressing files saved with the .tar file format. Doing so typically adds the compression filename extension to the archive file for example .tar.bz2.
tgz The .gz filename extension refers to the GZIP file format and compression/decompression utility of the same name which was initially released in 1992. It is the extension given to files compressed using the gzip utility. Unlike other compression tools of the time, gzip was originally intended to be used as a tool to compress a single file as opposed to multiple files or entire directories compressed as a single archive. As a work around, multiple files can be archived using the TAR archive file format, then that single TAR archive would then be compressed using the GZIP format. This would give the file a filename extension of .tar.gz.