Electron configuration and the 2p orbital
first of all electrons do not rotate but they have spins
next magnetic quantum number decides how many electrons an orbital can have
s can have 2(m=1){consider 1 box}
p can have 6(m=3){consider 3 boxes}
d can have 10(m=5){consider 5 boxes}
f can have 14(m=7){consider 7 boxes}
where each box can have at max 2 electrons and each box represents different orientation of the orbital
and all the orbitals(except s) have degenerate orbitals, i.e they have the same energy so all have to filled with atleast one electron before pairing up. this rule is known as Hund's Rule of Maximum Multiplicity
there are are some more reasons fro it. they are
to maximize exchange energy 
to attain symmetry