It is possible to corrupt data and even destroy a hard drive when running a powerful magnet over it. So I have a few question. Now if the magnet was powerful enough, can a drive be destroyed only if it is on and running or can it be destroyed while it is off/not in use. What about for data being corrupted: does the drive have to be in use or does it matter?
The data is encoded with tiny magnetic fields on platters inside the hard drive.
It doesn’t matter if the drive is on or off. A strong enough magnetic field will destroy the data on the platters.
Low level information is written by the manufacturer on to the same platters and is not touchable by the OS or user. If that information is also destroyed the drive will be unusable.
Appleoddity's answer is correct as far as it goes.
But it is extremely unlikely that you'll damage data on a hard drive, let alone damage the hard drive, with anything you'll do with a magnet on the outside of the drive. Affecting the domains on the hard drive requires an extremely high field gradient. In the hard drive this is achieved by having the gaps in the hard drive's heads extremely close to the surface.
In modern hard drives "extremely close" is less than five nanometers - less than a quarter of a millionth of an inch. For comparison, visible light has wavelengths from about 400 to 700 nm.
Consider that there are very strong rare earth magnets inside the hard drive, and they're a lot closer to the platter than you can get from the outside.
See my answer to this related question: Is CRT degaussing really dangerous for nearby laptops?