How to compress files to .pak file and use them?

I see .pak files in many game folders, I’ve read that it is because some games handle a lot of files as textures, music, etc; then those files are compressed into a .pak file. My question is, I am new in game dev, how I can compress files into a .pak (I work on Linux) and use them in my code (C ++)?