The Ore Magnet is a tool added by Twilight Forest. This tool has a durability of 13 and is used to pull ores from the ground to the surface. This works on all ores that have the word "Ore" in their names, except Coal Ore. The Magnet has a range of 32 blocks. It is found in Hollow HillChests.
Point the Magnet to the ground, charge it up by holding down the right mouse button (by default), then release. This should bring up roughly 24 blocks, and if the player is lucky, a whole vein to the surface.