We say magnetic force will not do any work, for example when charged particle is moving in a magnetic field
or a loop made of conducting wire is moved in a magnetic field. Magnetic force is associated with movement
either charge is moving or a coil is moving. Magnetic force is always defined by v×B, where v is relative velocity
and B is magnetic field flux density.
By this definition, force is perpendicular to movement, hence no workdone by magnetic field/force.
When the charge is moving in magnetic field it gets just deflected by magnetic field without changing its speed.
Hence no workdone. When a electrically conducting coil is moved in magenetic field, EMF is induced.
EMF is basically workdone on the charges to move and create potential difference. But this workdone is by the
external agency which is moving the coil in magnetic field.
In the case of attraction of metal coin towards the mechanism is different. The given bar magnet produces magnetic field
around the coin and this magnetic field magnetize the magnetic material of the coin. Magnetization means creating
tiny magnetic dipoles in the magnetic material. These magnetic dipoles experience a force due to magnetic field gradient
and it is given by, , where m is dipole moment of magnetic dipole and B is flux density of magnetic field.
This force is responsible to move the metallic coin towards magnet.