Sample packs are created by recording or taking pieces of high-quality audio/music and exporting them as samples.
They usually come in DAW (Digital Audio Workstation,) which is a software product that can be used for music creation, sound editing, and film post-production. It's capable of doing multitrack recording and mixing, non-linear editing via video track, synthesized sounds/virtual instruments software synthesis, etc. The idea is to export a specific clip from the multi-track session and upload it as a sample for others to download on top of their own soundtracks. There can be free sample packs as well as paid ones.