It works by having two or more magnets on a belt, and you just put the metal object touching the magnets and it sticks.
Scrap computer hard drive - Will be unusable as hard drive afterwards
Belt, or some other type of strap
Tape - Something thin like packing tape or only one or two layers of duct tape, if it is too thick the magnet will not work well
Scissors, for cutting tape
Gun, or whatever you will be the using the holster for, to test it
Step 1: Get the Magnets
To take it apart you can use a flathead screwdriver that fits perfectly, or use an actual Torx screwdriver which is the kind of screw in hard drives. I took this hard drive apart a while ago, so I can't provide a detailed walkthrough, but this page might be helpful.
Take It Apart dot net - Hard Drive
Some drives, like the one I used, don't come apart as easily as the one on that site, I had to pry apart the seal which was really hard.
Once you have the drive open, unscrew the magnets from the shell. There are some other useful parts in there too, like the platters (shiny circle things), where the actual data is written on to. If the magnets are attached to a small flat piece of metal on one side, don't worry about it, this will help protect them (some magnets are very fragile).
Step 2: Attach the Magnets to the Belt
Step 3: How to Use
To take it off, DO NOT slide it out as if it were a sword, this can scratch the gun and takes more time and space to do. The right way is to put your hand on the hilt, and bend it over your shoulder, something like if you're hauling a sack o' taters.