1. Magnetic Moment of the Spin: Each electron has its own spin, which determines the spin momentum. They remain in constant motion, and because they are endowed with a (negative) charge, they have a magnetic moment associated with the spin.
also:
2. Magnetic Moment of the Orbital Momentum: Each electron has an orbital momentum, behaving like a current circuit and the associated magnetic moment.
The interaction of magnetic moments of spin and orbital momentum is called spin-orbital coupling.
Second part of your question - if I understand correctly, this is due to the fact that electromagnetic interactions are relativistic (https://en.wikipedia.org/wiki/Relativistic_electromagnetism)
You know that the spin of electron has two energies (+1/2 and -1/2) this mean that the spin direction can be as example counterclockwise wise and clockwise, therefore this energy can be add to the orbital energy or subtracted from it according to the spinning direction leading to splitting the energy state.
Since the rotation speed of the electron v around the nucleus is relativistic, the nucleus creates a magnetic field of the form B = vXE / c2 where E is the electric field viewed by the electron, which is central E = | E / r | r and v = p / m. In addition, E derives from the potential V : E = (1 / e) dV / dr. Thus, by subtitution, we obtain the following expression for B :B = (1 /me r c2)(dV/dr) L, where L = rXp is the oribtal momentum. Finally, the electron having a magnetic moment due to its spin m=-guBS, it interacts with the magnetic field B,(Zeeman like-effect called spin-orbite interaction) as ESO=-m.B = -a L.S, where a=uB (1 /me r c2)(dV/dr) is the spin-orbite parameter which can be calculated in the quantum approach :