(This assumes you are using tar in Linux or Cygwin.)
First, open a terminal/bash session.
Change to the root directory you want to compress, then issue this command:
tar -cvzf archive_name.tgz *
If you want to include hidden files:
tar -cvzf archive_name.tgz .
To extract the archive file, copy it to an empty directory, then issue this command:
tar -xvf archive_name.tgz