It evolved from exposure to a special magnetic field. Three units generate magnetism.
A group tried to use scientific means to make Magnezone evolve, but their efforts ended in failure.