How to simulate magnetism In Blender?
Assuming that you are indeed referring to the magnetic toys and not the carbon nanomaterial, then you have a couple of different options.


Technically, you could model the magnetic attraction between all of the individual balls by using Blender's Force Field physics. You can enable this physics simulation in the Properties> Physics menu. However, this would be very inefficient. Since the magnetic attraction between these balls is so strong, they're almost always touching each other directly and you would hardly see any effects of the simulation.





Instead, you can just model the balls themselves, and keep most of them touching each other.
If you only have a few of them, it's probably fastest just to control their movements by hand. However, if you need to animate them more efficiently, you can use a combination of Array modifiers (parented to empty objects for convenience) and Transform/Relationship constraints as appropriate to keep the right balls locked to each others surfaces.


BuckyBalls: