how much work is done when a magnet pulls a piece of iron?

None, if the iron doesn't move.