With Gnome, this is as easy as opening a file browser > select file(s) > right click > Compress…
Here are the simple cases for the command line. For many more advanced options, check the man pages for zip and tar.
zip -r my_archive.zip /path/of/files/to/compress/
tar -zcvf my_archive.tar.gz /path/of/files/to/compress/
…and to uncompress an archive on the command line:
unzip my_archive.zip
tar -xvf my_archive.tar.gz
I know this is really basic stuff, right? Perhaps now that I’ve blogged it I won’t forget again.