What is ZIP?
ZIP is the archive format every operating system opens without being asked. Each file inside is compressed on its own, which is why you can pull one out without unpacking the rest, and why it compresses a folder of similar files less tightly than formats that treat them as one stream.
What is TAR?
TAR does one job: it glues many files into one, preserving Unix permissions and structure. It compresses nothing at all, which is why it is nearly always paired with gzip. It is the standard way source code and Linux software move around.