If you ever wondered how magnetic dice are made, now you can see one of the tools that was used to make hundreds of magnetic dice over several decades.
Magnetic dice have actual magnets inside of them. However, they are not made by inserting actual magnets into the cubes. Instead, the dice are filled with a resin that is capable of accepting a magnetic charge. Once the work on the cubes is completed all that remains is to give the dice a quick charge.
There is one part of the machine that isn't shown on this photo. The picture only shows the head of the machine, but this must be plugged into the main body of the machine. In any event, the head has a jaw into which a cube is inserted. The orientation of the cube is important, obviously, and in this photo the cube is inserted as it would be done to produce a pair of 5/2 magnetic dice (the other cube of the 5/2 pair would be inserted with the exact opposite orientation).
5/2 magnetic dice fall into the category of one-way magnetic dice. More elaborate variations are two-way and three-way magnetic dice. However, at this point in time I do not want to reveal all the secrets, so for now it will suffice to say that those other combinations do exist.