Even though they are called "rare earth" or "neodymium" magnets, they contain a lot of iron and other metals. All of the neodymium, iron, samarium, cobalt, nickel, etc., come from the ground.
Once the raw material is available, it must be ground to a powder and mixed to create various materials. Different mixtures will create materials with various magnetic properties. Some are stronger, others more durable, and others can last longer in high temperatures.
The next step is to press the mixture together into a structure.
We use a large electromagnet to optimize the pressed mixture for magnetization.
Once the particles are aligned, we can sinter the material to lock everything in place firmly.
The material can be further refined by cutting and machining it into smaller pieces. Tolerances are usually +/- 0.05mm. Micromachining specialists can work with much higher tolerances.
After the magnet's final shape is finished, we must coat or plate each piece to protect it from corrosion. This is especially true for Neodymium Iron Boron magnets, which are very susceptible to corrosion. Normal platings include Nickel, Nickle + Copper + Nickel, Epoxy Coating, Gold, ABS Plastic, and Zinc.