In our macro world we identify many forms of energy. In reality they all have a commonality because they are all about the interactions and behaviours of atomic particles or of the particle structures they form. Electricity and Magnetism are just such forms of energy.
Electricity: Electrons gather energy from the environment on behalf of nuclear particles. To perform that duty they need their own energy gathering space and they interact with other electrons via photon energies so as to maintain optimum locations. Electrons are energy linked to protons so as to satisfy their energy desires. These links are less strong when the the locations they occupy are further from nuclei. In fact outer electron energy link to more than one nuclei as with the chemical bonds we describe as covalent, ionic and metallic.
The metallic bonds between atoms in silver, copper gold and aluminium structures are such that outer electrons wander about serving the needs of protons in different nuclei. We call this wandering an electron gas and some wrongly describe such electrons as free.
Such electrons are not free, their energy links to protons make for the strength of metal structures. However we can give them a directional flow, moving them between proton links and causing them to interact with one another via light speed photons so that they move in a cascade fashion.
To make electrons move with direction around a circuit we provide a voltage source that delivers surplus electrons to one of its poles so that they want to be further apart and removes electrons from its other pole providing the energy gathering space or holes that electrons seek to occupy. Any move one outer electron makes almost immediately instigates movements in other electrons via light speed (300,000 kilometres a second) photon interactions. It is why energy can be conveyed over vast distances very quickly.
We should not think of electrons continuously on the move. They are generally spending considerably more time in atoms linking to protons than they are moving between atoms. Typical progress of an electron along a wire is a half metre every hour. When the moving electrons encounter an electrical load like a motor, a heater or electric light bulb the electrons have to gang up and jointly provide a push that moves electrons through the resisting load that does not want to change its structure .
Magnetism: Electrons have a property called spin. I believe it is the result of their internal energy fragments spinning. The spin direction is related to the orientation of the electron, which in turn is associated with the direction in which the electron is travelling. Some of the photon energies exchanged by interacting electrons are spun out from them, and when many electrons have like directions of motion they spin out low level photon energies in an anti clockwise direction relative to their travel.
Such photons are attracted back into the photon flows being exchanged by electrons so that the magnetic field we see circling clockwise around a current carrying wire is actually photon energies being flung out from electrons with like direction spin as a result of their many like direction motions. We see the magnetic field as circular, related to the current flow and diminishing with distance from the wire but the field is really of photon energies that spiral outward from electrons and then spiral inward to electrons.
When the current related photon energy links are rising (current increasing) the associated increasing spin energies spend longer in and grow in size the magnetic field energy, delaying their support of the current flow. When the current related energy links are falling the collapsing magnetic field energy tries to sustain the current flow. This is precisely what self induction is.
When two adjacent currents flow in opposite directions the circling photons passing between the two wires have like direction but want their own space. The photon energies interact and push one another apart and in so doing push the wires apart. When currents flow in the same direction photon flows between them are in conflict and many choose to go around both wires and that draws the wires together.
We should not think of neutrons, protons and electrons as being of fixed mass energies as they take on board and release photon energies that are general tiny relative to their mass energy. Nor should we think of photon energies as fixed. Like particle energies that interact via photons, photon energies interact by exchanging tiny portions of their energies. Magnetic photon energy interactions enable all electrical machines to work.
To close this blog let me explain the difference between magnetic materials and permanent magnets. Iron and steel are magnetic materials. They do not make good magnets. Soft iron is much used to support magnetic photon flows in electrical machines, solenoids, etc because its outer electrons will align with and support such photon flows, That alignment and support involves the electrons in soft iron ever realigning when the photon flows supported are those resulting from alternating electrical currents.
Permanent magnets are most often manufactures by sintering together powdered materials that together make for a hard, rigid particle structures. During the process many material electrons are given a like alignment by subjecting them to a powerful electromagnet. The similarly aligned, rigidly held electrons gather electrons from one direction in their quest to supply and interact with magnet proton energies. The rigidly held electrons also release to the environment, unwanted magnet structure photon energies in the opposite direction.
Whilst an energy gathering face of one magnet will seek out and be attracted to the energy releasing face of another magnet two energy gathering faces will not come together and will look elsewhere for energy. More obviously two energy releasing faces will not come together.