At times, Magnemite runs out of electricity and ends up on the ground. If you give batteries to a grounded Magnemite, it’ll start moving again.
It is attracted by electromagnetic waves. It may approach trainers if they are using their POKéGEAR.