How are magnetism and electricity are related?
Magnetism and electricity have a very intimate connection.
Time varying electric fields generate magnetic fields and time varying magnetic fields can generate electric fields.
The changing electric and magnetic fields generate each other so as to form an electromagnetic field.
So, a brief account of what I mean to say is,
When we have a magnetic field changing in a region of space, we find that an electric field is present in the space.
A simple experiment to illustrate the fact is the, when there is a relative motion between a closed coil and a magnetic, we find that a current flows in the circuit.
The phenomena is called electromagnetic induction and an explanation for this is, as follows
The changing magnetic field with respect to the coil, generates an electric field, the electric field causes a potential difference across two ends of the coil. which causes the current flow.
Similarly, a changing electric field in a region of space generates a magnetic field. (In addition, an electric current also produces a magnetic field, but unfortunately, there is no analogous so called magnetic current discovered so far.)
Thus, moving magnets exert forces on electric charges and moving charges generate forces on magnets.