When harvesting black sand in place of a spade, a magnet will not wear. It picks up the block with a single stroke.
When harvesting iron ore, a magnet will wear with each use until it fails and despawns. The magnet is so powerful that it extracts the ore from the stone with a single stroke, leaving behind an unharvested block of stone. Extracting with a magnet will produce five iron ore, instead of the three that a non-gem pickaxe does. Because of the nature of this process, it cannot be combined with a gem pickaxe's multiplier. (Note that even an amethyst pickaxe will out-produce a magnet.) The first time a magnet is used in this way, the player will acquire the "Attraction" achievement.
If a block of iron ore is damaged, but not destroyed, and a magnet is used on it, the resulting block of stone has the same amount of wear as the block of iron ore it was created from.