You need to use tar command as follows (syntax of tar command):
tar -zcvf archive-name.tar.gz directory-name
Where,
* -z: Compress archive using gzip program
* -c: Create archive
* -v: Verbose i.e display progress while creating archive
* -f: Archive File name
For example, you have directory called /home/jerry/prog