Step 1: Assess and open
Sealed (second photo)- a pair of pliers works great. Squeeze and slowly increase pressure until it pops, then pry. Alternatively, a hammer can be used.
Step 2: Remove film and prep for extraction
Use a needle, tack, or push-pin to remove the film and copper coil from around your magnet. If the solder on the back of the casing is pointy/hurting your hands, use a pair of pliers to gently flatten the metal (second photo).
Step 3: Extraction
The key to removing the magnet is a small, flat-head screwdriver (or the like). The gap between the casing and magnet is rather small, and the adhesive on this particular earbud was very strong.
There may be a flat metal plate covering the magnet, not removing it beforehand may cause you to chip your magnet. Look for it, account for it in the amount of downward pressure you exert, remove it and then move on to the magnet.
Once you liberate the magnet from the adhesive, it will still be stuck magnetically. Pry it out carefully or use another strong magnet to pull it out.
The cheap sealed earbud I cracked open needed no special technique. It wasn't even adhered- I pulled it right out.
Step 4: More
Enjoy your magnets!
*** No items were purchased in the making of this instructable, nor used for it, nor photographed, etc.. etc..***
(Not by me, anyway)