French philosopher, mathematician and physicist René Descartes came up with this concept of magnetism in his "Principia Philosophiae" 1644:
All magnetic fields are produced by moving or spinning charged particles…somewhere
Magnetism is a force in nature that is produced by electric fields in motion. This movement can involve electrons 'spinning' around atomic nuclei, flowing through a conducting wire, or ions moving through space in an organized stream. The remarkable thing is that whenever a charged particle moves, the electric field it produces is also moving through space, and it is this moving electric field that is detected as a magnetic field.
Electromagnets are created when electric currents move through a conducting wire. When you turn off the current by removing the battery, the magnetic field vanishes, so it is obvious that a current is involved in generating the magnetic field.
Permanent magnets (kitchen magnets) seem to contradict this rule, but in fact, they are magnetic because individual atoms with their 'orbiting' charged electrons are mostly lined up to create the overall 'permanent' magnet. The electron's orbital movement is the charged current that creates the magnetic field. Permanent magnets can be de-magnetized by heating them up. The jostling of the heated atoms eventually randomizes the directions of the atomic 'magnets', and the over-all field vanishes. In fact it is still there, the electrons still orbit their nuclei, but the magnetic domains in which the field is organized become smaller and smaller compared to the size of the magnet.