It evolved from exposure to a special magnetic field. Three units generate magnetism.
Sometimes the magnetism emitted by Magnezone is too strong, making them attract each other so they cannot move.