From the Super Mario Wiki
Mario vs. Donkey Kong 2: March of the Minis
Sparkies first appear in Mario vs. Donkey Kong 2: March of the Minis. They specifically appear on the Magnet Mania floor, where they slowly move clockwise from the red side of metal blocks with an "S" engraving. If a Magnetic Block is disabled from underneath it, the Sparky will vanish with it and another one will soon generate from the original block. They resemble the appearance of a Spark from Super Mario Bros. 2.
Mario vs. Donkey Kong: Mini-Land Mayhem!
Magnet Sparkies reappear once more in Mario vs. Donkey Kong: Mini-Land Mayhem! They act much as they do in their previous appearance, except they move at a slightly faster speed and briefly retreat into their blocks (now known as Magnet Sparky Generators) upon touching it rather than passing them by. They appear in Cosmic Adventure, and are a solid blue rather than flash yellow.
Names in other languages