The source of the magnetic field of the electron is spin 1/2. The wave creates little circular movements with rotation axis that is different on the “north” and “south” end (here the spin is from top to bottom).
The spins below are flipped horizontally, and two spinors are shown next to each other.
When we draw the (apparent) rottion centers (it is not rotation, but an oszillation!) as arrows, it looks like this:
When two spins face opposite ends (North vs South), it results in attraction,, than than if the spins face equal ends (North vs North):.