Spin diagrams give a visual representation of electron configurations along a graph. Each arrow represents an electron in the atom. The direction of the arrow represents the spin the electron has.

The Pauli Exclusion Principle

The Pauli Exclusion Principle states that each orbital may contain no more than two electrons.

This introduced a property of electrons called spin, which has two states ‘up’ or ‘down’. The spin of an electron in the same orbital must spin in different directions.

Hund’s Rule

Hund’s rule states that single electrons occupy all empty orbitals within a sub-level before they start to form pairs in orbitals.

If two electrons enter the same orbitals there is a repulsion between them due to their negative charges. The most stable configuration is with single electrons in different orbitals.

Hydrogen

1s1

Helium

1s2

Lithium

1s2 2s1

Beryllium

1s2 2s2

Boron

1s2 2s2 2p1

Carbon

1s2 2s2 2p2

Nitrogen

1s2 2s2 2p3

Oxygen

1s2 2s2 2p4

Fluorine

1s2 2s2 2p5

Neon

1s2 2s2 2p6

Sodium

1s2 2s2 2p6 3s1

Magnesium

1s2 2s2 2p6 3s2

Aluminium

1s2 2s22p6 3s3p1

Silicon

1s2 2s22p6 3s3p2

Phosphorous

1s2 2s22p6 3s3p3

Sulphur

1s2 2s22p6 3s3p4

Chlorine

1s2 2s22p6 3s3p5

Argon

1s2 2s22p6 3s3p6

Potassium

1s2 2s22p6 3s3p4s1

Calcium 

1s2 2s22p6 3s3p4s2

After the 1s2 2s22p6 3s3pformat, there is a break in the logical pattern in that 4s sub-level fills before the 3d sub level. 
This is because the 4s sub level is of lower energy than the 3d sub level. Once the 3dd sub level is filled, then the 4p sub level is filled

Electron Configuration of Transition Metals

When transition metals form ions, it is the 4s electron that are removed before the 3d electron.

Vanadium:

1s2 2s22p6 3s3p4s3d3

Nickel:

1s2 2s22p6 3s3p4s3d5

If there is a positive charged ion then to remove electrons, they are taken from the highest energy level.

e.g. Ni = 1s2 2s22p6 3s3p4s3d5

Ni2+= 1s2 2s22p6 3s3p3d 

As there is a 2+ charge on the second nickel, two electrons are taken from the highest energy level, which is the 4s shell.

e.g. Fe = 1s2 2s22p6 3s3p4s3d6 (or) [Ar] 4s2 3d6

Fe2+ = 1s2 2s22p6 3s3p3d6 (or) [Ar] 3d6