It's a combination of things, different for each sample pack designer.
sometimes they're made with synthesizers, sometimes they're sampled from other songs or old vinyl records then processed and changed so much that they're unrecognizable, sometimes they record things live and then process them, and sometimes they take samples from other sample packs then layer and process them together to become a new, whole sound!