I don’t know how much you know, so I start with the basics first:
So, .pak is generated by UnrealPak.exe located in …\UE_version\Engine\Binaries\Win64
(The editor will use it to package files for you, you don’t need to manually do that)
They’re basically archive files. So files, containing other files.
Just like the usual archives like .zip and .rar, they can be unpacked, in this case via the command line:
"path to UnrealPak.exe" "path to your pak file" -Extract "path to where the assets should go"
example:
"C:\Program Files\Epic Games\UE_4.25\Engine\Binaries\Win64\UnrealPak.exe" "C:\Game\blahblah.pak" -Extract "C:\Users\User\Desktop\Unpack"
Though, if they are encrypted, you can’t access them unless you have the key.
Also note that not all things can be recovered from a pak file due to conversion. Blueprints for example.
I probably don’t need to mention it, but just to make sure: you are not allowed to use any of the unpacked assets, unless you hold the copyright to those assets. Should be clear.